RG-HS2310 Series Switches
Command Reference, Release 11.4(1)B90

·Copyright Statement
Ruijie Networks©2023
Ruijie Networks reserves all copyrights of this document. Any reproduction, excerption, backup, modification,transmission, translation or commercial use of this document or any portion of this document, in any form or by any means,
without the prior written consent of Ruijie Networks is prohibited.

Exemption Statement
This document is provided “as is”. The contents of this document are subject to change without any notice. Please obtainthe latest information through the Ruijie Networks website. Ruijie Networks endeavors to ensure content accuracy and will
not shoulder any responsibility for losses and damages caused due to content omissions, inaccuracies or errors.

·PrefaceThank you for using our products. This manual matches the RGOS Release 11.9(6)B13P4.

Audience
This manual is intended for:

Network engineersTechnical support and servicing engineersNetwork administrators

Obtaining Technical Assistance

Ruijie Networks Website: https://ruijie.co.jp/Technical Support Website: https://www.ruijie.co.jp/service

Inquiry & Repair: https://www.ruijie.co.jp/service/post-salesTechnical Support Email: support_jp@ruijienetworks.com

Related Documents
Documents
Configuration Guide

Hardware Installation and Reference
Guide

Description
Describes network protocols and related mechanisms that supported by the
product, with configuration examples.
Describes the functional and physical features and provides the device
installation steps, hardware troubleshooting, module technical specifications,and specifications and usage guidelines for cables and connectors.

Conventions
This manual uses the following conventions:
Convention

Description

boldface font

Commands, command options, and keywords are in boldface.

italic font

Arguments for which you supply values are in italics.

[]

Elements in square brackets are optional.

{x|y|z}Alternative keywords are grouped in braces and separated by vertical bars.

·[x|y|z]

Optional alternative keywords are grouped in brackets and separated byvertical bars.

Symbols
Means reader take note. Notes contain helpful suggestions or references.

Means reader be careful. In this situation, you might do something that could result in equipment damage or loss ofdata.

Ethernet Configuration Commands
1. Interface Commands
2. MAC Address Commands
3. Aggregate Port Commands
4. VLAN Commands
5. Protocol VLAN Commands(beta)
6. Private VLAN Commands(beta)
7. MSTP Commands(beta)
8. GVRP Commands(beta)
9. LLDP Commands(beta)
10. ERPS Commands(beta)

Command Reference

Interface Commands

1 Interface Commands
1.1 bandwidth
Use this command to set the bandwidth on the interface. Use the no form of this command to restore
the default setting.
bandwidth kilobits
no bandwidthParameter
Description

Parameter

Description

kilobits

Bandwidth per second, in the unit of Kbps. The range is from 1 to2147483647.

Defaults

If this command is not configured on the interface, use the show interface command to display thedefault setting in privileged EXEC mode.

Command

Interface configuration mode

Mode

Usage Guide

This command does not affect the actual bandwidth on the interface. Instead, it is used to display thesystem the bandwidth specification. By default, the bandwidth is determined by the actual link rate on
the interface. It can be set by the user as well.

Configuration

The following example sets the bandwidth on the interface to 64 Kbps.

ExamplesRuijie(config)#interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# bandwidth 64

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.2 carrier-delay
Use this command to set the carrier delay on the interface. Use the no form of this command torestore the default value.
carrier-delay { [ milliseconds ] num | up [ milliseconds ] num down [ milliseconds ] num}no carrier-delay

1-2

Command Reference

Parameter
Description

Interface Commands

Parameter

Descriptionnum(Optional) in the range from 0 to 60 in the unit of seconds.

milliseconds(Optional) in the range from 0 to 60000 in the unit of milliseconds.

up

down

Defaults

The default is 2 seconds.

Command

Interface configuration mode

(Optional) Configures the delay after which DCD changes from Down
to Up in status.
(Optional) Configures the delay after which DCD changes from Up to
Down in status.

Mode

Usage Guide

This parameter refers to the delay after which the carrier detection signal DCD of the interface linkchanges from the Down status to the Up status or vice versa. If the DCD changes within the delay,
the system will ignore such changes without disconnecting the upper data link layer for renegotiation.
If the DCD carrier is disconnected for a long time, the parameter should be set longer to accelerateroute aggregation so that the routing table can be converged more quickly. On the contrary, if the
DCD carrier interruption period is shorter than the time used for route aggregation, you should set theparameter to a higher value to avoid unnecessary route vibration.

Configuration

The following example sets the carrier delay of serial interface to 5 seconds.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# carrier-delay 5
The following example sets the carrier delay of serial interface to 100 milliseconds.
Ruijie(config)# interface GigabitEthernet 0/17

Ruijie(config-if-GigabitEthernet 0/17)#carrier-delay milliseconds 100
The following example sets the DCD delay from Down to Up in status to 100 milliseconds and fromUp to Down to 200 milliseconds.

Ruijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# carrier-delay up milliseconds 100 down
milliseconds 200
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1-3

Command Reference

Interface Commands

1.3 clear counters
Use this command to clear the counters on the specified interface.
clear counters [ interface-type interface-number ]Parameter
Description

Parameterinterface-type
interface-number

Defaults

N/A

CommandPrivileged EXEC mode.

Description

Interface type and interface ID

ModeUsage Guide

In the privileged EXEC mode, use the show interfaces command to display the counters or the clear
counters command to clear the counters. If the interface is not specified, the counters on all
interfaces will be cleared.

Configuration

The following example clears the counters on interface gigabitethernet 0/17.

ExamplesRuijie# clear counters gigabitethernet 0/17

RelatedCommands

Platform

Command

Description

show interfaces

Displays the interface information.

N/A

Description

1.4 clear interface
Use this command to reset the interface.
clear interface interface-type interface-number

Parameter
Description

Parameterinterface-type
interface-number

Defaults

N/A

CommandPrivileged EXEC mode.

Description

Interface type and interface ID

Mode

1-4

Command Reference

Usage Guide

Interface Commands

This command is only used on the switch port, member port of the L2 Aggregate port, routing port,
and member port of the L3 aggregate port. This command is equal to the shutdown and no
shutdown commands.

Configuration

The following example resets the interface gigabitethernet 0/17.

ExamplesRuijie# clear interface gigabitethernet 0/17

RelatedCommands

Platform

Command

Description

shutdown

Disables the interface.

N/A

Description

1.5 description
Use this command to configure the alias of interface. Use the no form of this command to restore thedefault setting.
description string
no description

Parameter
Description

Parameter

Description

stringInterface alias

Defaults

No alias is configured by default.

Command

Interface configuration mode.

Mode

Usage Guide

Use show interfaces to display the interface information, including the alias.

Configuration

The following example configures the alias of interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# description GBIC-1

RelatedCommands

Platform

Command

Description

show interfaces

Displays the interface information.

N/A

Description

1-5Command Reference

Interface Commands

1.6 duplex
Use this command to specify the duplex mode for the interface. Use the no form of this command torestore the default setting.
duplex { auto | full | half }no duplex

Parameter
Description

Parameter

Description

auto

Self-adaptive full duplex and half duplex

full

Full duplex

half

Half duplex

Defaults

The default is auto,

Command

Interface configuration mode.

Mode

Usage Guide

The duplex mode is associated with the interface type. Use show interfaces to display the duplex
mode of the interface
The feature is not supported by G.hn ports.

Configuration

The following example specifies the duplex mode for the interface.

ExamplesRuijie(config-if-GigabitEthernet 0/17)# duplex full

RelatedCommands

Platform

Command

Description

show interfaces

Displays the interface information.

N/A

Description

1.7 eee enable
Use this command to enable Energy Efficient Ethernet (EEE) on the interface.
eee enable

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

This function is disabled by default.

1-6Command Reference

Command

Interface Commands

Interface configuration mode

Mode

Usage Guide

Use this command to achieve EEE on the interface in Low Power Idle(LPI) mode,

Configuration

The following example enables EEE on GigabitEthernet 0/17.

ExamplesRuijie(config)#interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# eee enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.8 errdisable recovery
Use this command to recover the interface in violation.
errdisable recovery [ interval time ]Parameter
Description

Parameter

Description

interval time

Time for the command to take effect. The range is from 30 to 86,400
seconds.

Defaults

By default, it is disabled.

Command

Global and Interface configuration mode.

Mode

Usage Guide

Use the command to recover the port that triggers violation after being configured with the violation
shutdown command.

Configuration

The following example recovers the violation interface gigabitethernet 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# errdisable recovery

RelatedCommands

Command

Description

switchport port-security violation shutdown

1-7

Configures the port security violation to
shutdown.

Command Reference

Platform

Interface Commands

N/A.

Description

1.9 flowcontrol
Use this command to enable or disable the flow control. Use the no form of this command to restore
the default setting.
flowcontrol { auto | off | on}
no flowcontrol

Parameter
Description

Parameter

Description

auto

Self-negotiates the flow control.

off

Disables the flow control.

onEnables the flow control.

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

Use the show interfaces command to display the flow control configuration.
The feature is not supported by G.hn ports.

Configuration

The following example enables flow control on GigabitEthernet port 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# flowcontrol on

RelatedCommands

Platform

Command

Description

show interfaces

Displays the interface information.

N/A

Description

1.10 interface
Use this command to enter the interface configuration mode.
interface interface-type interface-number

Parameter
Description

Parameter

Description

interface-type

The interface type.

1-8

Command Reference

interface-number

Defaults

N/A

Command

Interface configuration mode

Interface Commands

The interface ID.

ModeUsage Guide

This command is used to enter interface configuration mode. The user can modify the interface
configuration next,

Configuration

The following example enters configuration mode on Aggregateport 1.

ExamplesRuijie(config)# interface Aggregateport 1
Ruijie(config-if-Aggregateport 1)#
The following example enters configuration mode on GigabitEthernet 0/17.
Ruijie(config)# interface GigabitEthernet 0/17

Ruijie(config-if-GigabitEthernet 0/17)#
The following example configuration mode on VLAN 1.
Ruijie(config)# interface vlan 1

Ruijie(config-if-VLAN 1)#
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.11 interface range
Use this command to enter interface configuration mode on multiple interfaces.
interface range { port-range | macro macro_name }Use this command to define the macro name of the interface range command.
define interface-range macro_name

Parameter
Description

Parameter

Description

port-range

The interface type and ID range, entered in the form of interface-typeslot-number/interface-number. The interface can be either an
Ethernet physical interface or a loopback interface.

macro macro_name

Defaults

The macro name which represents the interface range.

The interface range command is disabled by default.

1-9Command Reference

Command

Interface Commands

Global configuration mode

Mode

Usage Guide

Use the define interface-range command to define a range of interfaces as the macro name and thenuse the interface range macro macro_name command to enter interface configuration mode on
multiple interfaces.

Configuration

The following example enters interface configuration mode on multiple interfaces by setting the

Examplesinterface range.
Ruijie(config)# interface range gigabitEthernet 0/17, 0/18
Ruijie(config-if-range)# bandwidth 100
The following example enters interface configuration mode on multiple interfaces by defining themacro name.
Ruijie(config)# define interface-range route1 gigabitEthernet 0/17-18
Ruijie(config)# interface range macro route1
Ruijie(config-if-range)# bandwidth 100

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.12 line-detect
Use this command to detect the cable connection status.
line-detect

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Interface configuration mode.

Mode

Usage Guide

This command is used to detect the line status and locate the problem in case of a line failure, forexample, the line is torn down.

Configuration

The following example detects the cable connection status on gigabitEthernet 0/17.

ExamplesRuijie(config)#interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#line-detect

1-10Command Reference

Interface Commands

Interface : GigabitEthernet 0/17
start cable-diagnoses,please wait...
cable-daignoses end!this is result:
4 pairs
pair state

length(meters)---- ---------- -------------A

Ok

1

pair state

length(meters)---- ---------- -------------B

Okpair state2
length(meters)---- ---------- -------------C

Short

pair state

1
length(meters)---- ---------- -------------D

Short

1

Field
pairs

Description
Number of line pairs included. For example, the twisted pair includes
four pairs of lines.
Status of the current line pair: OK, Short or Open. In general, the 100M

state

twisted pairs A and B are OK, C and D are Short. The 1000M twisted
pairs A, B, C and D are all OK.
Length of the line in meter. Only the length of the line pair whose status
is OK takes effect. Since the length is calculated based on thelengthtransmission time of signal, there may have a certain difference. The
length of the line pair whose status is Short or Open is the length fromthe port to the faulty point.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.13 load-interval
Use this command to set the interval for calculating load on the interface. Use the no form of thiscommand to restore the default setting.
load-interval seconds
no load-interval

1-11

Command Reference

Parameter
Description

Interface Commands

Parameter

Description

seconds

In the range from 5 to 600 in the unit of seconds.

Defaults

The default is 10.

Command

Interface configuration mode

Mode

Usage Guide

This command is used to set the interval for calculating load on the interface. In general, the numbersof incoming and outgoing packets and bytes are calculated every 10 seconds. For example, if theparameter is set to 180 seconds, the following outcome is displayed when the show interface
gigabitEthernet 0/17 command is run.
3 minutes input rate 15 bits/sec, 0 packets/sec
3 minutes output rate 14 bits/sec, 0 packets/sec

Configuration

The following example sets the interval for calculating load on interface GigabitEthernet 0/1 to 180

Examplesseconds.
Ruijie(config)# interface gigabitEthernet 0/17

Ruijie(config-if-GigabitEthernet 0/17)# load-interval 180
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.14 logging
Use this command to print information on the interface.
logging [ link-updown | error-frame | link-dither ]Parameter
Description

Parameter

Description

link-updown

Prints the status change information.

error-frame

Prints the error frame information.

link-dither

Prints the oscillation information.

Defaults

This function is enabled by default.

Command

Global configuration mode

Mode

1-12

Command Reference

Interface Commands

Usage Guide

N/A

Configuration

The following example prints information on the interface.

ExamplesRuijie(config)# logging link-updown
Ruijie(config)# logging error-frame
Ruijie(config)# logging link-dither

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.15 mtu
Use this command to set the MTU supported on the interface.
mtu num

Parameter
Description

Parameter

Description

num

64 to 9216

Defaults

The default is 1500.

Command

Interface configuration mode.

Mode

Usage Guide

This command is used to set the maximum transmission unit (MTU) supported on the interface.
The feature is not supported by G.hn ports.

Configuration

The following example sets the MTU supported on interface gigabitethernet 0/17 to 9000.

ExamplesRuijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# mtu 9000

RelatedCommands

Platform

Command

Description

show interfaces

Displays the interface information.

N/A

Description

1-13

Command Reference

Interface Commands

1.16 negotiation modeUse this command to enable or disable auto-negotiation mode. Use the no form of this command torestore the default setting.
negotiation mode { on | off }no negotiation mode

Parameter
Description

Parameter

DescriptiononEnables auto-negotiation.

off

Disables auto-negotiation.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

In general, the auto-negotiation status is determined by interface speed, duplex, flow control andauto-negotiation factor mode.
The feature is not supported by G.hn ports.

Configuration

The following example enables auto-negotiation mode on interface GigabitEthernet 0/17.

ExamplesRuijie(config)# interface GigabitEthernet 0/17

Ruijie(config-if-GigabitEthernet 0/17)# negotiation mode on
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.17 physical-port dither protect
Use this command to enable oscillation protection on the port.
physical-port dither protect

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

This function is enabled by default.

1-14Command Reference

Command

Interface Commands

Global configuration mode

Mode

Usage Guide

After you configure the physical-port dither protect command, the port will be shut down when theoscillation occurs for certain times.
If oscillation occurs on the port for 6 times within 2 seconds, a syslog will be printed. If syslog is
printed for 10 consecutive times, the port will be shut down, If oscillation occurs on the port forover 10 times within 10 seconds, a syslog will be printed but the port will not be shut down.

Configuration

The following example enables oscillation protection on the port.

ExamplesRuijie(config)# physical-port dither protect

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.18 protected-ports route-deny
Use this command to configure L3 routing between the protected ports. Use the no form of thiscommand to restore the default setting.
protected-ports route-denyno protected-ports route-denyParameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

The ports that are set as the protected ports can route on L3. Use this command to deny the L3
communication between protected ports. Use the show running-config command to display
configuration.

Configuration

The following example configures L3 routing between the protected ports.

ExamplesRuijie(config)# protected-ports route-deny

RelatedCommand

Description

1-15

Command Reference

Interface Commands

Commands
Displays the protected ports route-denyshow running-config

configuration.

Platform

N/A

Description

1.19 show eee interfaces status
Use this command to display interface EEE status.
show eee interfaces { interface-type interface-number | status }Parameter
Description

Parameter

Description

interface-type
interface-number
statusInterface type and ID.
All interface EEE status.

Defaults

N/A

CommandAny CLI mode

Mode

Usage Guide

If the interface is specified, the EEE status of the specified interface is displayed; otherwise, the EEE
status of all interfaces is displayed.

Configuration
ExamplesThe following example displays EEE status of interface GigabitEthernet 0/1.
Ruijie#show eee interface gigabitEthernet 0/17
Interface: Gi0/17

EEE Support: Yes

Admin Status: Enable

Oper Status: Enable

Remote Status: Unknown

Trouble Cause: NoneField

Description

EEE Support

Whether EEE is supported

Admin Status

Configuration status

Oper Status

Operation status

Trouble Cause

Trouble cause

The following example displays EEE status of all interfaces.
Ruijie(config)#show eee interfaces status
Interface EEE
Support

Admin

Oper

RemoteTroubleStatusStatusStatus

Cause

1-16

Command Reference

Interface Commands---------- -------- --------- --------- --------- -----------------------

RelatedCommands

Platform

Ghn0/1

Yes

EnableEnableUnknown

None

Ghn0/2Yes

DisableDisableUnknown

None

Ghn0/3Yes

DisableDisableUnknown

None

Ghn0/4

Yes

DisableDisableUnknown

None

Ghn0/5

Yes

DisableDisableUnknown

None

Ghn0/6

Yes

DisableDisableUnknown

None

Ghn0/7

Yes

DisableDisableUnknown

None

Ghn0/8Yes

DisableDisableUnknown

None

Ghn0/9Yes

DisableDisableUnknown

None

Ghn0/10Yes

DisableDisableUnknown

None

Ghn0/11Yes

DisableDisableUnknown

None

Ghn0/12Yes

DisableDisableUnknown

None

Ghn0/13

Yes

DisableDisableUnknown

None

Ghn0/14

Yes

DisableDisableUnknown

None

Ghn0/15

Yes

DisableDisableUnknown

None

Ghn0/16

Yes

DisableDisableUnknown

None

Gi0/17

Yes

EnableEnableUnknown

None

Gi0/18Yes

DisableDisableUnknownNone

Te0/19

NO

-

-

-

-

Command

Description

N/A

N/A

N/A

Description

1.20 show interfaces
Use this command to display the interface information and optical module information.
show interfaces [ interface-type interface-number ] [ description | switchport | trunk ]Parameter
Description

Parameter

Description

interface-type

Interface (including Ethernet interface, aggregate port, SVI or loopback

interface-number

interface).

description

The description of the interface, including the link status.

switchport

Layer 2 interface information.

trunk

Trunk port, applicable for physical port and aggregate port.

Defaults

1-17

Command Reference

Command

Interface Commands

Any CLI mode.

Mode

Usage Guide

This command is used to show all basic information if no parameter is specified.

Configuration

The following example displays the interface information when the Gi0/17 is a Trunk port.

ExamplesRuijie#show interfaces gigabitEthernet 0/17
Index(dec):1 (hex):1
GigabitEthernet 0/17 is DOWN , line protocol is DOWN
Hardware is Broadcom 5464 GigabitEthernet
Interface address is: no ip address
MTU 1500 bytes, BW 1000000 Kbit
Encapsulation protocol is Bridge, loopback not set
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
Queueing strategy: FIFO
Output queue 0/0, 0 drops;
Input queue 0/75, 0 drops
Switchport attributes:
interface's description:""medium-type is copper
lastchange time:0 Day: 0 Hour: 0 Minute:13 Second
Priority is 0
admin duplex mode is AUTO, oper duplex is Unknown
admin speed is AUTO, oper speed is Unknown
flow receive control admin status is OFF,flow send control admin status is OFF,flow
receive control oper status is Unknown,flow send control oper status is Unknown
broadcast Storm Control is OFF,multicast Storm Control is OFF,unicast Storm Control
is OFF
Port-type: trunk
Native vlan:1
Allowed vlan lists:1-4094
Active vlan lists:1, 3-4
5 minutes input rate 0 bits/sec, 0 packets/sec
5 minutes output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer, 0 dropped
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
0 packets output, 0 bytes, 0 underruns , 0 dropped
0 output errors, 0 collisions, 0 interface resets

The following example displays the interface information when the Gi0/17 is an Access port.
Ruijie#show interfaces gigabitEthernet 0/17

1-18

Command Reference

Interface Commands

Index(dec):1 (hex):1
GigabitEthernet 0/17 is DOWN , line protocol is DOWN
Hardware is Broadcom 5464 GigabitEthernet
Interface address is: no ip address
MTU 1500 bytes, BW 1000000 Kbit
Encapsulation protocol is Bridge, loopback not set
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
Queueing strategy: FIFO
Output queue 0/0, 0 drops;
Input queue 0/75, 0 drops
Switchport attributes:
interface's description:""medium-type is copper
lastchange time:0 Day: 0 Hour: 0 Minute:13 Second
Priority is 0
admin duplex mode is AUTO, oper duplex is Unknown
admin speed is AUTO, oper speed is Unknown
flow receive control admin status is OFF,flow send control admin status isOFF,flow receive control oper status is Unknown,flow send control oper status is
Unknown
broadcast Storm Control is OFF,multicast Storm Control is OFF,unicast Storm Control
is OFF
Port-type: access
Vlan id : 2
5 minutes input rate 0 bits/sec, 0 packets/sec
5 minutes output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer, 0 dropped
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
0 packets output, 0 bytes, 0 underruns , 0 dropped
0 output errors, 0 collisions, 0 interface resets

The following example displays the layer-2 interface information when the Gi0/17 is a Hybrid port.
SwitchA#show interfaces gigabitEthernet 0/17
Index(dec):1 (hex):1
GigabitEthernet 0/17 is DOWN , line protocol is DOWN
Hardware is Broadcom 5464 GigabitEthernet
Interface address is: no ip address
MTU 1500 bytes, BW 1000000 Kbit
Encapsulation protocol is Bridge, loopback not set
Keepalive interval is 10 sec , set
Carrier delay is 2 sec

1-19

Command Reference

Interface Commands

RXload is 1 ,Txload is 1
Queueing strategy: FIFO
Output queue 0/0, 0 drops;
Input queue 0/75, 0 drops
Switchport attributes:
interface's description:""medium-type is copper
lastchange time:0 Day: 0 Hour: 0 Minute:13 Second
Priority is 0
admin duplex mode is AUTO, oper duplex is Unknown
admin speed is AUTO, oper speed is Unknown
flow receive control admin status is OFF,flow send control admin status isOFF,flow receive control oper status is Unknown,flow send control oper status is
Unknown
broadcast Storm Control is OFF,multicast Storm Control is OFF,unicast Storm Control
is OFF
Port-type: hybrid
Tagged vlan id:2
Untagged vlan id:none
5 minutes input rate 0 bits/sec, 0 packets/sec
5 minutes output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer, 0 dropped
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
0 packets output, 0 bytes, 0 underruns , 0 dropped
0 output errors, 0 collisions, 0 interface resets

The following example displays the layer-2 information of the Gi0/17.
Ruijie# show interfacesgigabitEthernet 0/17 switchport
Interface Switchport ModeAccess Native Protected VLAN lists--------- ---------- --------- ------ ------ --------GigabitEthernet 0/17 enabled Access 11 Disabled ALL

RelatedCommands

Command

Description

duplexDuplexflowcontrol

Flow control status.
Selects the interface and enter the interface

interface gigabitEthernet

configuration mode.
Creates or accesses the aggregate port, and enters

interface aggregateport

the interface configuration mode.
Creates or accesses the switch virtual interface

interface vlan

(SVI), and enters the interface configuration mode.
Disables the interface.

shutdown

1-20

Command Reference

Platform

Interface Commands

speed

Configures the speed on the port.

switchport priority

Configures the default 802.1q interface priority.

switchport protected

Configures the interface as a protected port.

N/A

Description

1.21 show interfaces counters
Use this command to display the received and transmitted packet statistics.
show interfaces [ interface-type interface-number ] counters [ increment | error | rate | summary ][ up | down ]Parameter
Description

Parameter

Description

interface-type(Optional) The interface type and ID.

interface-number
Displays the packet statistics increased during the last sample

incrementinterval.

error

Displays error packet statistics.

rate

Displays packet receiving and transmitting rate.

summary

Displays packet statistics summary.

up(Optional) Displays the port up statistics.

down(Optional) Displays the port down statistics.

Defaults

N/A

CommandAny CLI mode

Mode

Usage Guide

If you do not specify an interface, the packet statistics on all interfaces are displayed.

Configuration

The following example displays packet statistics on interface GigabitEthernet 0/17.

ExamplesRuijie#show interfaces GigabitEthernet 0/17 counters
Interface : GigabitEthernet 0/17
5 minute input rate : 9144 bits/sec, 9 packets/sec
5 minute output rate : 1280 bits/sec, 1 packets/sec
Rxload: 1%

InOctets: 17310045

InPkts: 1000(Unicast: 10%, Multicast: 10%, Broadcast: 80%)

InUcastPkts: 100

InMulticastPkts: 100

InBroadcastPkts

: 800

1-21

Command Reference

Interface Commands

Txload: 1%

OutOctets: 1282535

OutPkts: 1000(Unicast: 10%, Multicast: 10%, Broadcast: 80%)

OutUcastPkts: 100

OutMulticastPkts: 100

OutBroadcastPkts: 800

Undersize packets: 0

Oversize packets: 0collisions: 0

Fragments: 0

Jabbers: 0

CRC alignment errors : 0
AlignmentErrors: 0

FCSErrors: 0

dropped packet events (due to lack of resources): 0
packets received of length (in octets):
64:4626465-127: 47427
128-255: 3478
256-511: 658
512-1023: 18016
1024-1518: 125
Packet increment in last sampling interval(5 seconds):
InOctets: 10000

InPkts: 1000(Unicast: 10%, Multicast: 10%, Broadcast: 80%)

InUcastPkts: 100

InMulticastPkts: 100

InBroadcastPkts: 800

OutOctets: 10000

OutPkts: 1000(Unicast: 10%, Multicast: 10%, Broadcast: 80%)

OutUcastPkts: 100

OutMulticastPkts: 100

Rxload refers to the receive bandwidth usage and Txload refers to the Tx bandwidth usage.
InPkts is the total number of receive unicast, multicast and broadcast packets. OutPkts is thetotal number of transmit unicast, multicast and broadcast packets.
Packet increment in last sampling interval (5 seconds) represents the packet statistics increased
during the last sample interval (5 seconds).
The following example displays the packet statistics on interface GigabitEthernet 0/17 increased
during the last sample interval.
Ruijie#show interfaces GigabitEthernet 0/17 counters increment
Interface : GigabitEthernet 0/17
Packet increment in last sampling interval(5 seconds):
InOctets: 10000

1-22

Command Reference

Interface Commands

InPkts: 1000(Unicast: 10%, Multicast: 10%, Broadcast: 80%)

InUcastPkts: 100

InMulticastPkts: 100

InBroadcastPkts: 800

OutOctets: 10000

OutPkts: 1000(Unicast: 10%, Multicast: 10%, Broadcast: 80%)

OutUcastPkts: 100

OutMulticastPkts: 100

The following example displays error packet statistics on interface GigabitEthernet 0/17.
Ruijie#show interfaces GigabitEthernet 0/17 counters errors
Interface

UnderSize

OverSize

Collisions

Fragments------------ -------------------- -------------------- --------------------------------------Gi0/17

0

0

0

0

Interface

Jabbers

CRC-Align-Err

Align-Err

FCS-Err------------ -------------------- -------------------- --------------------------------------Gi0/17

0

0

0

0

UnderSize is the number of valid packets smaller than 64 bytes.
OverSize is the number of valid packets smaller than 1518 bytes.
Collisions is the number of colliding transmit packets.
Fragments is the number of packets with CRC error or frame alignment error which are smaller
than 64 bytes.
Jabbers is the number of packets with CRC error or frame alignment error which are smaller
than 1518 bytes.
CRC-Align-Err is the number of receive packets with CRC error.
Align_Err is the number of receive packets with frame alignment error.
FCS-Err is the number of receive packets with FCS error.
The following example displays packet receiving and transmitting rate on interface GigabitEthernet
0/17.
Ruijie#show interface gigabitEthernet 0/17 counters rate
InterfaceSampling Time

Input Rate

Input Rate

Output Rate

(bits/sec)(packets/sec)(bits/sec)

Output Rate(packets/sec)------------ --------------------- -------------------- --------------------------------------- --------------------

Gi0/17124

5 seconds
0

23391

23

Sampling Time is the time when packets are sampled. Input rate is packet receiving rate andOutput rate is packet transmitting rate.
The following example displays packet statistics summary on interface GigabitEthernet 0/17.
Ruijie#show interface gigabitEthernet 0/17 counters summary

1-23

Command Reference

Interface Commands

Interface

InOctets

InUcastPkts

InMulticastPkts

InBroadcastPkts------------- -------------------- -------------------- --------------------------------------Gi0/17

1475788005

1389

45880503

11886621

Interface

OutOctets

OutUcastPkts

OutMulticastPkts

OutBroadcastPkts------------- -------------------- -------------------- ---------------------------------------

Gi0/1713410

6667915

6382

31629

InOctets is the total number of packets received on the interface. InUcastPkts is the number ofunicast packets received on the interface. InMulticastPkts is the number of multicast packets
received on the interface. InBroadcastPkts is the number of broadcast packets received on theinterface.
OutOctets is the total number of packets transmitted on the interface. OutUcastPkts is thenumber of unicast packets transmitted on the interface. OutMulticastPkts is the number ofmulticast packets transmitted on the interface. OutBroadcastPkts is the number of broadcast
packets transmitted on the interface.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.22 show interfaces link-state-change statistics
Use this command to display the link state change statistics, including the time and count.
show interfaces [ interface-type interface-number ] link-state-change statistics

Parameter
Description

Parameter

Description

interface-type

The interface type and ID.

interface-number

Defaults

N/A

CommandAny CLI mode

Mode

1-24

Command Reference

Interface Commands

Usage Guide

If you do not specify an interface, the link state statistics of all interfaces are displayed.

Configuration

The following example displays the link state statistics of interface GigabitEthernet 0/17.

ExamplesRuijie# show interfaces GigabitEthernet 0/1 link-state-change statistics
Interface

Link state

Link state change times

Last change time---------------------------------------------------------------

Gi0/17

RelatedCommands

Platform

down

100

2012-12-24 15:00:00

Interface

Description

Link state

Current link state.

Link state change times

The count of link state change.

Last change time

The time when the last link state change occurs.

Command

Description

N/A

N/A

N/A

Description

1.23 show interfaces status
Use this command to display interface status information.
show interfaces [ interface-type interface-number ] status

Parameter
Description

Parameter

Description

interface-type

The interface type and ID.

interface-number
statusDefaults

N/A

CommandAny CLI mode

Displays interface status information, including speed and duplex.

Mode

Usage Guide

If you do not specify an interface, the status information of all interfaces is displayed.

Configuration

The following example displays the status information of interface GigabitEthernet 0/17.

ExamplesRuijie#show interfaces GigabitEthernet 0/17 status
Interface

StatusVlan

DuplexSpeed------------------------------------------------ ------

1-25

Type

Command Reference

Interface Commands

GigabitEthernet 0/17
RelatedCommands

Platform

up

1

Full

Command

Description

N/A

N/A

1000M

copperN/A

Description

1.24 show interfaces status err-disable
Use this command to display the interface violation status.
show interfaces [ interface-type interface-number ] status err-disable

Parameter
Description

Parameter

Description

interface-type(Optional) The interface type and ID.

interface-number

Defaults

CommandAny CLI mode

Mode

Usage Guide

If you do not specify an interface, violation status of all interfaces is displayed.

Configuration

The following example displays the violation status of interface GigabitEthernet 0/17.

ExamplesRuijie#show interface gigabitEthernet 0/17 status err-disabledInterface

StatusReason-------------------------------- ---------------- ---------------GigabitEthernet 0/17

err-disabled

BPDU Guard

The violation status is displayed as err-disabled.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1-26

Command Reference

Interface Commands

1.25 show interfaces transceiver
Use this command to display transceiver information of the interface.
show interfaces [ interface-type interface-number ] transceiver [ alarm | diagnosis ]Parameter
Description

Parameter

Description

interface-type

The interface type and ID.

interface-number
Displays the transceiver information.

transceiver

Displays the alarm message of the transceiver. If there is no alarm

alarm

message, it is displayed as None.
Displays the diagnostic parameters of the transceiver.

diagnosis

Defaults

N/A

CommandAny CLI mode

Mode

Usage Guide

If you do not specify an interface, the transceiver information of all interfaces is displayed.
The feature is not supported by G.hn and GigabitEthernet ports.

Configuration

The following example displays the transceiver information of interface tenGigabitethernet 0/19.

ExamplesRuijie# show interfaces tenGigabitEthernet 0/19 transceiver
Transceiver Type: 1000BASE-SX-SFP

Connector Type: LC

Wavelength(nm): 850Transfer Distance:

50/125 um OM2 fiber-- 550m
62.5/125 um OM1 fiber-- 270m
Digital Diagnostic Monitoring: YES

Vendor Serial Number: 101680093602489

The following example displays the alarm message of the transceiver of interface tenGigabitethernet
0/19.
Ruijie#show interfaces tenGigabitEthernet 0/19 transceiver alarm
tenGigabitEthernet 0/19 transceiver current alarm information:RX

loss of signal

The following example displays the diagnostic parameters of the transceiver of interface
tenGigabitethernet 0/19.
Ruijie#show interfaces tenGigabitEthernet 0/19 transceiver diagnosis
Current diagnostic parameters[AP:Average Power]:
Temp(Celsius)

Voltage(V)Bias(mA)

1-27

RX power(dBm)

TX power(dBm)Command Reference

Interface Commands

38(OK)-40.00(alarm)
RelatedCommands

Platform

3.20(OK)

0.04(OK)-40.00(alarm)[AP]Command

Description

N/A

N/A

N/A

Description

1.26 show interfaces usage
Use this command to display bandwidth usage of the interface.
show interfaces [ interface-type interface-number ] usage [ up | down ]Parameter
Description

Parameter

Description

interface-type(Optional) The interface type and ID.

interface-number
up(Optional) Displays the port up statistics.

down(Optional) Displays the port down statistics.

Defaults

N/A

CommandAny CLI mode

Mode

Usage Guide

If you do not specify an interface, the bandwidth usage of all interfaces is displayed. Bandwidth refers
to the actual link bandwidth rather than the bandwidth parameter configured on the interface.

Configuration

The following example displays bandwidth usage of interface GigabitEthernet 0/17.

ExamplesInterface

Bandwidth

Average Usage

Output Usage

Input Usage---------------------------- ------------- ------------------ --------------------------------GigabitEthernet 0/171000 Mbit

0.002822759%

0.001183280%

0.004462237%
Bandwidth refers to the interface link bandwidth, the maximum speed of link. Average Usagerefers to the current usage.

RelatedCommands

Command

Description

N/A

N/A

1-28

Command Reference

Platform

Interface Commands

N/A

Description

1.27 shutdown
Use this command to disable an interface. Use the no form of this command to enable a disabled
port.
shutdownno shutdown

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

By default, the administrative status of an interface is Up.

Command

Interface configuration mode

Mode

Usage Guide

Use this command to stop the forwarding on the interface (Gigabit Ethernet interface, Aggregate port
or SVI). You can enable the port with the no shutdown command. If you shut down the interface, theconfiguration of the interface exists, but does not take effect. You can view the interface status byusing the show interfaces command.
You need to wait 15 seconds after execution under G.hn port for the chip to be readyIf you use the script to run no shutdown frequently and rapidly, the system may prompt theinterface status reversal.

Configuration

The following example disables an interface.

ExamplesRuijie(config)# interface aggregateport 1
Ruijie(config-if- AggregatePort 1)# shutdown
The following example enables an interface.
Ruijie(config)# interface aggregateport 1
Ruijie(config-if- AggregatePort 1)# no shutdown

RelatedCommands

Platform

Command

Description

clear interface

Resets the hardware.

show interfaces

Displays the interface information.

N/A

Description

1-29

Command Reference

Interface Commands

1.28 snmp trap link-status
Use this command to send LinkTrap on a port. Use the no form of this command to disable thisfunction.
snmp trap link-status
no snmp trap link-status

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is enabled by default

Command

Interface configuration mode.

Mode

Usage Guide

For an interface (for instance, Ethernet interface, AP interface, and SVI interface), this command sets
whether to send LinkTrap on the interface. If the function is enabled, the SNMP sends the LinkTrap
when the link status of the interface changes.

Configuration

The following example disables the interface from sending LinkTrap on the interface.

ExamplesRuijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# no snmp trap link-status
The following example enables the interface to forward Link trap.
Ruijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# snmp trap link-status

RelatedCommands

Command

Description
Enables the interface to send LinkTrap on thesnmp trap link-statusinterface.
Disables the interface from sending LinkTrap

no snmp trap link-status

Platformon the interface.

N/A

Description

1.29 snmp-server if-index persist
Use this command to set the interface index persistence. The interface index remains the same after
the device is restarted.
snmp-server if-index persist

1-30

Command Reference

Parameter
Description

Interface Commands

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

After this command is configured, all interface indexes are saved in the configuration file. After thedevice is restarted, interface indexes remain the same as before.

Configuration

The following example enables the interface index persistence.

ExamplesRuijie(config)# snmp-server if-index persist

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.30 speed
Use this command to configure the speed on the port. Use the no form of this command to restore thedefault setting.
speed [ 10 | 100 | 1000 | auto ]Parameter
Description

Parameter

Description

10

The transmission rate of the interface is 10Mbps.

100

The transmission rate of the interface is 100Mbps.

1000

The transmission rate of the interface is 1000Mbps.

auto

Self-adaptive

Defaults

The default is auto.

Command

Interface configuration mode.

Mode

Usage Guide

If an interface is the member of an aggregate port, the rate of the interface depends on the rate of theaggregate port. You can set the rate of the interface, but it does not take effect until the interface exits
the aggregate port. Use show interfaces to display configuration. The rate varies by interface types.

1-31

Command Reference

Interface Commands

For example, you cannot set the rate of a SFP interface to 10M or 100M.
The feature is not supported by G.hn ports.

Configuration

The following example sets the speed on interface gigabitethernet 0/17 to 100Mbps.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# speed 100

RelatedCommands

Platform

Command

Description

show interfaces

Displays the interface information.

N/A

Description

1.31 switchport access
Use this command to configure an interface as a statics access port and add it to a VLAN. Use the noform of this command to restore the default setting.
switchport access vlan vlan-id
no switchport access vlan

Parameter
Description

Parameter

Description

vlan-id

The VLAN ID at which the port to be added.

Defaults

By default, the switch port is an access port and the VLAN is VLAN 1.

Command

Interface configuration mode.

Mode

Usage Guide

Enter one VLAN ID. The system will create a new one and add the interface to the VLAN if you entera new VLAN ID. If the VLAN ID already exists, the command adds the interface to the VLAN.
If the port is a trunk port, the operation does not take effect.

Configuration

The following example configures interface gigabitethernet 0/17 as a statistic access port and adds it

Examplesto VLAN 2.
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport access vlan 2

RelatedCommands

Command

Description
Configures the interface as Layer 2 modeswitchport mode(switch port mode).

1-32

Command Reference

Interface Commands

Configures a native VLAN and theswitchport trunk

Platform

allowed-VLAN list for the trunkport.

N/A

Description

1.32 switchport modeUse this command to specify a L2 interface (switch port) mode. You can specify this interface to be
an access port or a trunk port or an 802.1Q tunnel. Use the no form of this command to restore thedefault setting.
switchport mode { access | trunk }no switchport mode

Parameter
Description

Parameter

Description

accessConfigures the switch port as an access port.

trunk

Configures the switch port as a trunk port.

Defaults

The default is access.

Command

Interface configuration mode.

Mode

Usage Guide

If a switch port mode is access port, it can be the member port of only one VLAN. Use switchport
access vlan to specify the member of the VLAN.
A trunk port can be the member port of various VLANs defined by the allowed-VLAN list. The
allowed VLAN list of the interface determines the VLANs to which the interface may belong. The
trunk port is the member of all the VLANs in the allowed VLAN list. Use switchport trunk to define
the allowed-VLANs list.

Configuration

The following example specifies a L2 interface (switch port) mode.

ExamplesRuijie(config-if-GigabitEthernet 0/17)# switchport mode trunk

RelatedCommands

Command

Description
Configures an interface as a statics accessswitchport accessport and assigns it to a VLAN.
Configures a native VLAN and theswitchport trunk

Platform

allowed-VLAN list for the trunk port.

N/A

Description

1-33

Command Reference

Interface Commands

1.33 switchport protected
Use this command to configure the interface as the protected port. Use the no form of this command
to restore the default setting.
switchport protected
no switchport protected

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

The ports that are set as the protected ports cannot switch on L2, but can route on L3. A protected
port can communicate with an unprotected port. Use the show interfaces command to display
configuration.

Configuration

The following example configures interface gigabitethernet 0/17 as a protected port.

ExamplesRuijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport protected

RelatedCommands

Platform

Command

Description

show interfaces

Displays the interface information.

N/A

Description

1.34 switchport trunk
Use this command to specify a native VLAN and the allowed-VLAN list for the trunk port. Use the noform of this command to restore the default setting.
switchport trunk { allowed vlan { all | [ add | remove | except | only ] vlan-list } | native vlan
vlan-id }no switchport trunk { allowed vlan | native vlan }Parameter
Description

Parameter

Description

allowed vlan

Configures the list of VLANs allowed on the trunk port. vlan-list canvlan-list

be a VLAN or a range of VLANs starting with the smaller VLAN ID

1-34

Command Reference

Interface Commands

and ending with the larger VLAN ID and being separated by hyphen,for example, 10 to 20. The segments can be separated with a comma(,), for example, 1 to 10, 20 to 25, 30, 33.
all means that the allowed VLAN list contains all the supported
VLANs;
add means to add the specified VLAN list to the allowed VLAN list;
remove means to remove the specified VLAN list from the allowed
VLAN list;
except means to add all the VLANs other than those in the specified
VLAN list to the allowed VLAN list;
native vlan
vlan-id

Configures the native VLAN.

Defaults

The allowed VLAN list is all, the Native VLAN is VLAN1.

Command

Interface configuration mode.

Mode

Usage Guide

Native VLAN:
A trunk port belongs to one native VLAN. A native VLAN means that the untagged packets
received/sent on the trunk port belong to the VLAN. Obviously, the default VLAN ID of the interface(that is, the PVID in the IEEE 802.1Q) is the VLAN ID of the native VLAN. In addition, when framesbelonging to the native VLAN are sent over the trunk port, they are untagged.
Allowed-VLAN List:
By default, a trunk port sends traffic to and received traffic from all VLANs (ID 1 to 4094). However,you can prevent the traffic from passing over the trunk by configuring allowed VLAN lists on a trunk.
Use show interfaces switchport to display configuration.

Configuration

The following example removes port 0/17 from VLAN 2.

ExamplesRuijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport trunk allowed vlan remove
2
Ruijie(config-if-GigabitEthernet 0/17)# end
Ruijie# show interfaces GigabitEthernet 0/17 switchport
Switchport is enabled
Mode is trunk port
Access vlan is 1,Native vlan is 1
Protected is disabled
Vlan lists is1,3-4094

RelatedCommands

Command

Description

show interfaces

Displays the interface information.

1-35

Command Reference

Interface Commands

Configures an interface as a statics access port

switchport access

Platformand assigns it to a VLAN.

N/ADescription

1-36

Command Reference

MAC Address Commands

2 MAC Address Commands
2.1 clear mac-address-table dynamic
Use this command to clear the dynamic MAC address.
clear mac-address-table dynamic [ address mac-address [ interface interface-id ] [ vlan vlan-id ] |{ [ interface interface-id ] [ vlan vlan-id ] } ]Parameter

Parameter

Description

Description

dynamic

Clears all the dynamic MAC addresses.

address mac-address

Clears the specified dynamic MAC address.

interface interface-id

vlan vlan-id

Defaults

N/A

CommandPrivileged EXEC mode.

Clears all the dynamic MAC addresses of the specified
interface.
Clears all the dynamic MAC addresses of the specified VLAN,
in the range from 1 to 4094.

Mode

Usage Guide

Use the show mac-address-table dynamic command to display all the dynamic MAC addresses.

Configuration

The following command clears all the dynamic MAC addresses.

ExamplesRuijie# clear mac-address-table dynamic

RelatedCommand

Description

Commands

show mac-address-table dynamic

Displays dynamic MAC address.

Platform

N/A

Description

2.2 mac-address-learning
Use this command to enable the port address learning. Use the no or default form of this command
to restore the default setting.
mac-address-learningno mac-address-learningdefault mac-address-learning

Parameter

Parameter

Description

2-1

Command Reference

MAC Address Commands

Description

N/A

N/A

Defaults

The address learning function is enabled.

Command

Interface configuration mode.

Mode

Usage Guide

MAC address learning cannot be disabled on the port where the security function is enabled. The
security function cannot be configured on the port where address learning is disabled.

Configuration

The following example disables the port address learning function.

ExamplesRuijie(config-if-GigabitEthernet 0/1)# no mac-address-learning

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.3 mac-address-learning (global)
Use this command to enable MAC address learning globally. Use the no or default form of thiscommand to restore the default setting.
mac-address-learning enable
Use this command to disable MAC address learning globally.
mac-address-learning disable
Use this command to restore MAC address learning globally.
default mac-address-learning

Parameter
Description

Parameter

Description

enableEnables MAC address learning globally.

disableDisables MAC address learning globally.

Defaults

The mac-address-learning enable command is enabled by default.

Command

Global configuration mode

Mode

Usage Guide

When this function is enabled, the MAC address is learned in global configuration mode the same aslearned in interface configuration mode.

Configuration

The following example disables MAC address learning globally.

ExamplesRuijie(config)# mac-address-learning disable

2-2

Command Reference

MAC Address Commands

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.4 mac-address-table aging-time
Use this command to specify the aging time of the dynamic MAC address. Use the no or default formof the command to restore the default setting.
mac-address-table aging-time seconds
no mac-address-table aging-timedefault mac-address-table aging-timeParameter

Parameter

Description

Description
Aging time of the dynamic MAC address (in seconds).

seconds

The range is from 10 to 630. The value can be set to 0,
indicating no aging.

Defaults

The default is 300.

Command

Global configuration mode.

Mode

Usage Guide

Use show mac-address-table aging-time to display configuration.

Configuration

The following example sets the aging time of the dynamic MAC address to 500 seconds.

ExamplesRuijie(config)# mac-address-table aging-time 500

RelatedCommand

Description

Commands

show mac-address-table aging-time

Displays the aging time of the dynamic MAC address.

show mac-address-table dynamic

Displays dynamic MAC address.

Platform

N/A

Description

2.5 mac-address-table filtering
Use this command to configure the filtering MAC address. Use the no or default form of thecommand to restore the default setting.
mac-address-table filtering mac-address vlan vlan-id

2-3

Command Reference

MAC Address Commands

no mac-address-table filtering mac-address vlan vlan-id
default mac-address-table filtering mac-address vlan vlan-id

Parameter

Parameter

Description

Description

mac-address

Filtering Address

vlan-id

VLAN ID, in the range from 1 to 4094.

Defaults

No filtering address is configured by default.

Command

Global configuration mode.

Mode

Usage Guide

The filtering MAC address shall not be a multicast address.

Configuration

The following example configures the filtering MAC address for VLAN 1.

ExamplesRuijie(config)#mac-address-table filtering 0000.0202.0303 vlan 3

RelatedCommand

Description

Commands

clear mac-address-table filtering

Clears the filtering MAC address.

Platform

N/A

Description

2.6 mac-address-table notification
Use this command to enable the MAC address notification function. Use The no or default form of
the command to restore the default setting.
mac-address-table notification [ interval value | history-size value ]no mac-address-table notification [ interval | history-size ]default mac-address-table notification [ interval | history-size ]Parameter
Description

Parameterinterval value

history-size value

Defaults

Description
Sets the interval of sending the MAC address trap message, 1
second by default.
Sets the maximum number of the entries in the MAC address
notification table, 50 entries by default.

By default, the interval is 1 and the maximum number of the entries in the MAC address notificationtable is 50.

Command

Global configuration mode.

Mode

2-4

Command Reference

Usage Guide

MAC Address Commands

The MAC address notification function is specific for only dynamic MAC address and secure MAC
address. No MAC address trap message is generated for static MAC addresses. In the global
configuration mode, you can use the snmp-server enable traps mac-notification command toenable or disable the switch to send the MAC address trap message.

Configuration

The following example enables the MAC address notification function.

ExamplesRuijie(config)# mac-address-table notification
Ruijie(config)# mac-address-table notification interval 40
Ruijie(config)# mac-address-table notification history-size 100

RelatedCommand

Description

Commands

snmp-server enable traps

Sets the method of handling the MAC address trap message.

show mac-address-table

Displays the MAC address notification configuration and thenotification

MAC address trap notification table.

snmp trap mac-notification

Platform

Enables the MAC address trap notification function on thespecified interface.

N/A

Description

2.7 mac-address-table static
Use this command to configure a static MAC address. Use the no or default form of the command torestore the default setting.
mac-address-table static mac-address vlan vlan-id interface interface-id
no mac-address-table static mac-address vlan vlan-id interface interface-id
default mac-address-table static mac-address vlan vlan-id interface interface-id

Parameter

Parameter

Description

Description

mac-address

Destination MAC address of the specified entryvlan-id

VLAN ID of the specified entry, in the range from 1 to 4094.

interface-id

Interface (physical interface or aggregate port) that packets are forwarded to

Defaults

No static MAC address is configured by default.

Command

Global configuration mode.

Mode

Usage Guide

A static MAC address has the same function as the dynamic MAC address that the switch learns.
Compared with the dynamic MAC address, the static MAC address will not be aged out. It can only be
configured and removed by manual. Even if the switch is reset, the static MAC address will not belost. A static MAC address shall not be configured as a multicast address. Use show

2-5

Command Reference

MAC Address Commands

mac-address-table static to display the static MAC address.

Configuration

N/A

ExamplesRelatedCommand

Description

Commands

show mac-address-table static

Displays the static MAC address.

Platform

N/A

Description

2.8 max-dynamic-mac-countUse this command to set the maximum number of MAC address learned dynamically on the VLAN orinterface. Use the no or default form of this command to restore the default setting.
max-dynamic-mac-count num
no max-dynamic-mac-countdefault max-dynamic-mac-countParameter

Parameter

Descriptionnum

Description
Sets the maximum number of MAC addresses.The range isfrom 1 to 16000.

Defaults

The maximum number is not set by default.

Command

VLAN configuration mode / Interface configuration mode

Mode

Usage Guide

This command is used to set the maximum number of MAC addresses learned dynamically on the
VLAN or interface.
If the number of MAC addresses dynamically learned on the VLAN or interface reaches the upper
limit, MAC address learning is disabled on the VLAN or interface.
If the number of MAC addresses reaches the upper limit when this command is configured, thesurplus MAC addresses are not cleared. Instead, they remain and then age. MAC address learning is
disabled on the VLAN or interface.
Use the show mac-address-table max-dynamic-mac-count command to display the maximum
number of MAC addresses learned dynamically on the VLAN or interface.

Configuration

The following example sets the maximum number of MAC addresses dynamically learned on

Examplesinterface GigabitEthernet 0/17.
Ruijie#configure terminal
Enter configuration commands, one per line.

End with CNTL/Z.

Ruijie(config)#interface GigabitEthernet 0/17

2-6Command Reference

MAC Address Commands

Ruijie(config-if-GigabitEthernet 0/17)#max-dynamic-mac-count 160

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.9 show mac-address-learning
Use this command to display the MAC address learning.
show mac-address-learning

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

Command

All modes.

Mode

Usage Guide

N/A

Configuration

The following example displays the MAC address learning.

ExamplesRuijie#show mac-address-learning
Ghn 0/1

learning ability: enable

Ghn 0/2

learning ability: enable

Ghn 0/3

learning ability: enable

Ghn 0/4

learning ability: enable

Ghn 0/5

learning ability: enable

Ghn 0/6

learning ability: enable

Ghn 0/7

learning ability: enable

Ghn 0/8

learning ability: enable

Ghn 0/9

learning ability: enable

Ghn 0/10

learning ability: enable

Ghn 0/11

learning ability: enable

Ghn 0/12

learning ability: enable

Ghn 0/13

learning ability: enable

Ghn 0/14

learning ability: enable

Ghn 0/15

learning ability: enable

Ghn 0/16

learning ability: enable

GigabitEthernet 0/17

learning ability: enable

GigabitEthernet 0/18

learning ability: enable

TenGigabitEthernet 0/19 learning ability: enable2-7

Command Reference

MAC Address Commands

AggregatePort 1

learning ability: enable

Ruijie#RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.10 show mac-address-table
Use this command to display all types of MAC addresses (including dynamic address, static address
and filter address).
show mac-address-table [ address mac-address ] [ interface interface-id ] [ vlan vlan-id ]Parameter
Description

Parameter

Description

address mac-address

The MAC address.

interface interface-id

The Interface ID.

vlan vlan-id

The VLAN ID, in the range from 1 to 4094.

Defaults

N/A

Command

All modes

Mode

Usage Guide

N/A

Configuration

The following example displays the MAC address.

ExamplesVlan

MAC Address

Type---------------------------

100d0.f800.1001

Interface

Live Time----------------STATIC

GigabitEthernet 0/17 Interface

Live Time----------------

Ruijie# show mac-address-table
Vlan

MAC Address

Type---------------------------

100d0.f800.1001

STATIC

GigabitEthernet 0/17-

100d0.f800.1002

DYNAMIC GigabitEthernet 0/17-

100d0.f800.1003

OTHER

-

1

00d0.f800.1004

FILTER

GigabitEthernet 0/17
-

Field

Description

Vlan

The interface address.

MAC Address

The MAC address.

Type

The MAC address type.

Interface

The interface corresponding to the MAC

2-8

Command Reference

MAC Address Commands

address.
Live TimeThe live time of MAC address.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.11 show mac-address-table aging-time
Use this command to display the aging time of the dynamic MAC address.
show mac-address-table aging-timeParameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

Command

All modes.

Mode

Usage Guide

N/A

Configuration

The following example displays the aging time of the dynamic MAC address.

ExamplesRuijie# show mac-address-table aging-timeAging time

: 300

RelatedCommand

Description

Commands

mac-address-table aging-time

Sets the aging time of the dynamic MAC address.

Platform

N/A

Description

2.12 show mac-address-table countUse this command to display the number of address entries in the address table.
show mac-address-table count [ interface interface-id | vlan vlan-id ]Parameter

Parameter

Description

Description

interface interface-id

Interface ID

vlan vlan-id

VLAN ID, in the range from 1 to 4094.

2-9

Command Reference

MAC Address Commands

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

The show mac-address-table count command is used to display the number of entries based on
the type of MAC address entry.
The show mac-address-table count interface command is used to display the number of entries
based on the interface associated with the MAC address entry.
The show mac-address-table count vlan command is used to display the number of entries basedon the VLAN of MAC address entries.

Configuration

The following example displays the number of MAC address entries.

ExamplesRuijie#show mac-address-table count
Dynamic Address Count : 0
StaticAddress Count : 0

Filtering Address Count: 1
Other

Address Count : 0

Total Mac Addresses: 1

Total Mac Address Space Available: 16383
The following example displays the number of MAC address in VLAN 1.
Ruijie# show mac-address-table count vlan 1
Dynamic Address Count : 7
Static Address Count : 0
Filter Address Count : 0
Other Address Count : 0
Total Mac Addresses : 7

The following example displays the number of MAC addresses on interface gi 0/17.
Ruijie# show mac-address-table count interface gi 0/17
Dynamic Address Count : 10
Static Address Count : 0
Filter Address Count : 0
Other Address Count : 0
Total Mac Addresses : 10

Related

Field

Discription

Dynamic Address Count

Number of dynamic addresses

Static Address Count

Number of static addresses

Filter Address Count

Number of filter addresses

Other Address Count

Number of other addresses

Total Mac Addresses

Number of total MAC addresses

Command

Description

2-10

Command Reference

Commands

MAC Address Commands

show mac-address-table static

Displays the static address.

show mac-address-table filtering

Displays the filtering address.

show mac-address-table dynamic

Displays the dynamic address.

show mac-address-table address

show mac-address-table interface
show mac-address-table vlan

Platform

Displays all the address information of the specified
address.
Displays all the address information of the specified
interface.
Displays all the address information of the specified vlan.

N/A

Description

2.13 show mac-address-table dynamic
Use this command to display the dynamic MAC address.
show mac-address-table dynamic [ address mac-add r] [ interface interface-id ] [ vlan vlan-id ]Parameter

Parameter

Description

Description

mac-address

Destination MAC address of the entryvlan-id

VLAN of the entry, in the range from 1 to 4094.
Interface that the packet is forwarded to.

interface-id

It may be a physical port or an aggregate port

Defaults

Command

All modes.

Mode

Usage Guide

N/A

Configuration

The following example displays the dynamic MAC address.

ExamplesRuijie# show mac-address-table dynamic
Vlan

MAC Address

TypeInterface

Live Time------------------------- -------- ------------------10000.0000.0001

DYNAMIC gigabitethernet 0/17 1d 00:19:00

10001.960c.a740

DYNAMIC gigabitethernet 0/17 1d 00:28:00

10007.95c7.dff9

DYNAMIC gigabitethernet 0/17 1d 00:38:00

10007.95cf.eee0

DYNAMIC gigabitethernet 0/17 1d 00:42:00

10007.95cf.f41f

DYNAMIC gigabitethernet 0/17 1d 00:45:00

10009.b715.d400

DYNAMIC gigabitethernet 0/17 1d 00:58:00

10050.bade.63c4

DYNAMIC gigabitethernet 0/17 1d 00:59:00

Field

Description

Vlan

The interface address.

2-11Command Reference

MAC Address Commands

MAC Address

The MAC address.

Type

The MAC address type.

Interface

The interface corresponding to the MAC
address.

Live TimeThe live time of MAC address.

RelatedCommand

Description

Commands

clear mac-address-table dynamic

Clears the dynamic MAC address.

Platform

N/A

Description

2.14 show mac-address-table filtering
Use this command to display the filtering MAC address.
show mac-address-table filtering [ address mac-address ] [ vlan vlan-Id ]Parameter

Parameter

Description

Description

mac-address

Destination MAC address of the entryvlan-id

VLAN ID of the entry, in the range from 1 to 4094.

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the filtering MAC address.

ExamplesRuijie# show mac-address-table filtering
Vlan

MAC Address

TypeInterface

Live Time------- ----------------- ------- ----------10000.2222.2222

FILTER Not available

-

Field

Description

Vlan

The interface address.

MAC Address

The MAC address.

Type

The MAC address type.

Interface

The interface corresponding to the MAC
address.

Live TimeThe live time of MAC address.

RelatedCommand

Description

Commands

mac-address-table filtering

Configures the filtering MAC address.

2-12Command Reference

Platform

MAC Address Commands

N/A

Description

2.15 show mac-address-table interface
Use this command to display all the MAC addresses on the specified interface including static anddynamic MAC address
show mac-address-table interface [ interface-id ] [ vlan vlan-id ]Parameter
Description

Parameter

Description
Displays the MAC address information of the specified Interface

interface-id(physical interface or aggregate port).

vlan-id

Defaults

N/A

CommandPrivileged EXEC mode.

VLAN ID of the entry, in the range from 1 to 4094.

Mode

Usage Guide

N/A

Configuration

The following example displays all the MAC addresses on interface gigabitethernet 0/17.

ExamplesRuijie# show mac-address-table interface gigabitethernet 0/17
Vlan MAC Address

TypeInterface

Live Time----- ------------- -------- ---------------- --1

00d0.f800.1001 STATIC gigabitethernet 0/17 -100d0.f800.1002 STATIC gigabitethernet 0/17 -100d0.f800.1003 STATIC gigabitethernet 0/17 -100d0.f800.1004 STATIC

gigabitethernet 0/17 –Field

Description

Vlan

The interface address.

MAC Address

The MAC address.

Type

The MAC address type.

Interface

The interface corresponding to the MAC
address.

Live TimeThe live time of MAC address.

RelatedCommand

Description

Commands

show mac-address-table static

Displays the static MAC address.

show mac-address-table filtering

Displays the filtering MAC address.

show mac-address-table dynamic

Displays the dynamic MAC address.

show mac-address-table address

Displays all types of MAC addresses.

2-13

Command Reference

Platform

MAC Address Commands

show mac-address-table vlan

Displays all types of MAC addresses of the specified VLAN.

show mac-address-table countDisplays the address counts in the MAC address table.

N/A

Description

2.16 show mac-address-table notification
Use this command to display the MAC address notification configuration and the MAC address
notification table.
show mac-address-table notification [ interface [ interface-id ] | history ]Parameter
Description

Parameterinterfaceinterface interface-id
history

Description
Displays the MAC address notification configuration on all
interfaces.
Displays the MAC address notification configuration on a
specific interface.
Displays the MAC address notification history.

Defaults

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the MAC address notification configuration globally.

ExamplesRuijie#show mac-address-table notification
MAC Notification Feature : EnabledInterval(Sec): 300
Maximum History Size : 50
Current History Size : 0

RelatedCommand

Description

Commands

mac-address-table notification

Enables MAC address notification.

snmp trap mac-notification

Platform

Enables the MAC address trap notification function on thespecified interface.

N/A

Description

2-14

Command Reference

MAC Address Commands

2.17 show mac-address-table static
Use this command to display the static MAC address.
show mac-address-table static [address mac-address ] [ interface interface-Id ] [ vlan vlan-id ]Parameter

Parameter

Description

Description

mac-address

Destination MAC address of the entryvlan-id

VLAN ID of the entry, within the range from 1 to 4094.

interface-id

Interface of the entry physical interface or aggregate port

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the static MAC addresses

ExamplesRuijie# show mac-address-table static
Vlan

MAC Address

TypeInterface

Live Time---------- -------------------- -------- ---- --1 00d0.f800.1001

STATIC gigabitethernet 0/17 -1 00d0.f800.1002

STATIC gigabitethernet 0/17 -100d0.f800.1003 STATIC

gigabitethernet 0/17 –Field

Description

Vlan

The interface address.

MAC Address

The MAC address.

Type

The MAC address type.

Interface

The interface corresponding to the MAC
address.

Live TimeThe live time of MAC address.

RelatedCommand

Description

Commands

mac-address-table static

Configures the static MAC address.

Platform

N/A

Description

2.18 show mac-address-table vlan
Use this command to display all addresses of the specified VLAN.

2-15

Command Reference

MAC Address Commands

show mac-address-table vlan [ vlan-id ]Parameter

Parameter

Description

Description

vlan-id

VLAN ID of the entry, in the range from 1 to 4094.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays all addresses of the specified VLAN.

ExamplesRuijie# show mac-address-table vlan 1
Vlan MAC Address

TypeInterface

Live Time----- ------------- ------- -----------------1

00d0.f800.1001

STATIC gigabitethernet 0/17 -100d0.f800.1002

STATIC gigabitethernet 0/17 -100d0.f800.1003 STATIC

gigabitethernet 0/17 –Field

Description

Vlan

The interface address.

MAC Address

The MAC address.

Type

The MAC address type.

Interface

The interface corresponding to the MAC
address.

Live TimeThe live time of MAC address.

RelatedCommand

Description

Commands

show mac-address-table static

Displays static addresses.

show mac-address-table filtering

Displays filtered addresses.

show mac-address-table dynamic

Displays dynamic addresses.

show mac-address-table address

show mac-address-table interface
show mac-address-table countPlatform

Displays all address information about the specified
address.
Displays all address information about the specified
interface.
Displays the number of addresses in the address table.

N/A

Description

2-16

Command Reference

Aggregate Port Commands

2.19 snmp trap mac-notification
Use this command to enable the MAC address trap notification on the specified interface. Use The noor default form of the command to restore the default setting.
snmp trap mac-notification { added | removed }no snmp trap mac-notification { added | removed }default snmp trap mac-notification { added | removed }Parameter

Parameter

Description

Description

added

Notifies when a MAC address is added.

removedNotifies when a MAC address is removed

Defaults

Command

Interface configuration mode.

Mode

Usage Guide

Use show mac-address-table notification interface to display configuration.

Configuration

The following example enables the MAC address trap notification on interface gigabitethernet 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# snmp trap mac-notification added

RelatedCommand

Description

Commands

mac-address-table notification

Enables MAC address notification.

show mac-address-table

Displays the MAC address notification configuration and thenotification

MAC address notification table.

Platform

N/A

Description

3 Aggregate Port Commands
3.1 aggregateport load-balance
Use this command to configure a global load-balance algorithm for aggregate ports or a load-balancealgorithm for an aggregate port . Use the no form of this command to return the default setting.
aggregateport load-balance { dst-mac | src-mac | src-dst-mac | dst-ip | src-ip | src-dst-ip |dst-l4port | src-dst-l4port | src-l4port | src-port }no aggregateport load-balance

Parameter

Parameter

Description

3-17

Command Reference

Description

dst-mac

Aggregate Port Commands

Load balance based on the destination MAC addresses of the incoming packets.
For all the links of an aggregate port, the messages with the same destination MAC
addresses are sent to the same port, and those with different destination MAC
addresses are sent to different ports.

src-mac

Load balance based on the source MAC addresses of the incoming packets. For all
the links of an aggregate port, the messages from different addresses are
distributed to different ports, and those from the same addresses are distributed tothe same port.

src-dst-ip

Load balance based on the source IP address and destination IP address. Packets
with different source and destination IP address pairs are forwarded throughdifferent ports. The packets with the same source and destination IP address pairs
are forwarded through the same links. At layer 3, this load balancing style isrecommended.

dst-ipLoad balance based on the destination IP addresses of the incoming packets. For
all the links of an aggregate port, the messages with the same destination IP
addresses are sent to the same port, and those with different destination IP
addresses are sent to different ports.

src-ipLoad balance based on the source IP addresses of the incoming packets. For all
the links of an aggregate port, the messages from different addresses are
distributed to different ports, and those from the same addresses are distributed tothe same port.

src-dst-mac

Load balance based on the source and destination MAC addresses. Packets withdifferent source and destination MAC address pairs are forwarded through different
ports. The packets with the same source and destination MAC address pairs areforwarded through the same port.

dst-l4port

Load balance based on the L4 destination port number.

src-dst-l4port

Load balance based on the L4 source port number and L4 destination port number.

src-l4port

Load balance based on the L4 source port number.

src-port

Load balance based on the source port.

Defaults

The default load balance mode is src-dst-mac.

Command

Global configuration mode

Mode

Usage Guide

To restore the default settings, run the no aggregateport load-balance command in global
configuration mode.
The feature is not supported by G.hn ports.

Configuration

The following example configures a load-balance algorithm globally based on the destination MAC

Examplesaddress.
Ruijie(config)# aggregateport load-balance dst-mac

RelatedCommand

Description

3-18

Command Reference

Aggregate Port Commands

Commands

show aggregateport load-balance

Platform

N/A

Displays aggregate port configuration.

Description

3.2 aggregateport member linktrap
Use this command to send LinkTrap to aggregate port members. Use the no form of this command torestore the default setting.
aggregateport member linktrap
no aggregateport member linktrap

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

This function cannot be enabled by running the snmp trap link-status command in interface
configuration mode. However, it can be enabled by running the aggregateport member linktrap
command in global configuration mode.

Configuration

The following example enables the LinkTrap function on the aggregate port members.

ExamplesRuijie# configure terminal

Ruijie(config)# aggregateport member linktrap
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3.3 interface aggregateport
Use this command to create the aggregate port or enter interface configuration mode of theaggregate port. Use the no form of this command to restore the default setting.
interface aggregateport ap-number
no interface aggregateport ap-number

Parameter

Parameter

Description

Description

ap-number

Aggregate port number.

3-19

Command Reference

Aggregate Port Commands

Defaults

The aggregate port is not created by default.

Command

Global configuration mode

Mode

Usage Guide

If the aggregate port is created, this command is used to enter the interface configuration mode.
Otherwise, this command is used to create the aggregate port and then enter its interface
configuration mode.

Configuration

The following example creates AP 5 and enters its interface configuration mode.

ExamplesRuijie# configure terminal
Ruijie(config)# interface aggregateport 5
Ruijie(config-if-Aggregateport 5)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3.4 lacp port-priority
Use this command to set the priority of the LACP AP member port. Use the no form of this command
to restore the default setting.
lacp port-priority port-priority
no lacp port-priority

Parameter
Description

Parameter

Description

port-priority

The LACP port priority, in the range from 0 to 65535.

Defaults

The default is 32768.

Command

Interface configuration mode

Mode

Usage Guide

N/A
The feature is not supported by G.hn ports.

Configuration

This example sets the LACP port priority of interface Gi0/17 to 4096.

ExamplesRuijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# lacp port-priority 4096

3-20

Command Reference

RelatedCommands

Platform

Aggregate Port Commands

Command

Description

N/A

N/A

N/A

Description

3.5 lacp short-timeout
Use this command to configure the short-timeout mode for the LACP AP member port. Use the noform of this command to restore the default setting.
lacp short-timeout
no lacp short-timeout

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The default is long-timeout mode.

Command

Interface configuration mode

Mode

Usage Guide

In long-timeout mode, the port sends an LACP packet every 30 seconds. If the packet is not received
in 90 seconds, the connection times out.
In short-timeout mode, the port sends an LACP packet every 1 second. If the packet is not received in
3 seconds, the connection times out.
The G.hn port does not support this function.

Configuration

The following example configures the short-timeout mode for the LACP AP member port.

ExamplesRuijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# lacp short-timeout

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3-21

Command Reference

Aggregate Port Commands

3.6 lacp system-priority
Use this command to set the LACP system priority. Use the no form of this command to restore thedefault setting.
lacp system-priority system-priority
no lacp system-priority

Parameter
Description

Parameter

Description

system-priority

The LACP system priority, in the range from 0 to 65535.

Defaults

The default is 32768.

Command

Global configuration mode.

Mode

Usage Guide

Configuration

The following example sets the LACP system priority to 4096.

ExamplesRuijie(config)# lacp system-priority 4096

RelatedCommands

Command

Description

port-group key mode { active | passive }aggregation group ID and operation mode.
Sets the LACP port priority.

lacp port-priority

Platform

Enables the LACP on the port and specifies theN/ADescription

3.7 port-group
Use this command to assign a physical interface to be a member port of a static aggregate port or an
LACP aggregate port. Use the no form of this command to restore the default setting.
port-group port-group-number
port-group key-number mode { active | passive }no port-group

Parameter

Parameter

Description

Description

port-group-number

Member group ID of an aggregate port, the interface number of theaggregate port.

key-number

Member group ID of an LACP aggregate port, the interface number of

3-22

Command Reference

Aggregate Port Commands

the LACP aggregate port.
activepassive

Places a port into an active negotiating state, in which the port initiates
negotiations with remote ports by sending LACP packets.
Places a port into a passive negotiating state, in which the port responds
to LACP packets it receives but does not initiate LACP negotiation.

Defaults

By default, the physical port does not belong to any aggregate port.

Command

Interface configuration mode.

Mode

Usage Guide

All the members of an aggregate port belong to a VLAN or configured to be trunk ports. The ports
belonging to different native VLANs cannot form an aggregate port.
The feature is not supported by G.hn ports.

Configuration

The following example specifies the Ethernet interface 0/17 as a member of the static AP 3.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# port-group 3
The following example specifies the Ethernet interface 0/17 as a member of the LACP AP4 and set
the aggregation mode to active.
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# port-group 4 mode active

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.8 show aggregateport
Use this command to display the aggregate port configuration.
show aggregateport { [ aggregate-port-number ] summary | load-balance }Parameter

Parameter

Description

Description

aggregate-port-number

Number of the aggregate port.

load-balance

Displays the load-balance algorithm on the aggregate port.

summary

Displays the summary of the aggregate port.

Defaults

N/A

CommandAny mode

Mode

3-23

Command Reference

Aggregate Port Commands

Usage Guide

If the aggregate port number is not specified, all the aggregate port information will be displayed.

Configuration

The following example displays the aggregate port configuration.

ExamplesRuijie# show aggregateport 1 summary
AggregatePort MaxPorts SwitchPort Mode

Ports------------- -------- ---------- ------ ----------------------------------Ag1

8

EnabledACCESS Gi0/17

RelatedCommand

Description

Commands

aggregateport load-balance

Configures a load-balance algorithm of AP.

Platform

N/A

Description

3.9 show lacp summary
Use this command to display the LACP aggregation information.
show lacp summary [ key ]Parameter
Description

Parameter

Description

key

Specifies the aggregation group id to show. If it is not specified, allaggregation group information is displayed by default.

Defaults

N/A

CommandAny mode.

Mode

Usage Guide

N/A

Configuratio

The following example displays the LACP aggregation information.

n Examples

Ruijie(config)# show lacp summary 3
System Id:32768, 00d0.f8fb.0002
Flags:

S - Device is requesting Slow LACPDUs

F - Device is requesting Fast LACPDUs.
A - Device is in active mode.

P - Device is in passive mode.

Aggregate port 3:
Local information:
Port

Flags

State

LACP port

Oper

Port

Port

PriorityKey

NumberState-------------------------------------------------------------------------Gi0/17

SA

bndl

4096

3-24

0x3

0x1

0x3d

Command Reference
Gi0/18Aggregate Port Commands
SA

bndl

4096

0x3

0x2

0x3d

Oper

Port

Port

Key

NumberState

Partner information:
LACP port
Port

Flags

Priority

Dev ID-------------------------------------------------------------------------Gi0/17

SA

61440

00d0.f800.0002

0x3

0x1

0x3d

Gi0/18SA

61440

00d0.f800.0002

0x3

0x2

0x3d

Field

Description

Local information

Displays the local LACP information.

Port

Displays the system port ID.
Displays the port state flag: “S” indicates that the LACP

Flags

is stable and in the state of periodically sending the
LACPPDU; “A” indicates that the port is in the activemode.
Show the port aggregation information: “bndl” indicatesStatethat the port is aggregated; “Down” represents thedisconnection port state; “susp” indicates that the port
is not aggregated.

LACP Port Priority

Displays the LACP port priority.

Oper Key

Displays the port operation key.

Port Number

Displays the port number.

Port State

Displays the flag bit for the LACP port state.

Partner information

Partly Displays the LACP information of the peer port.

Dev ID

RelatedCommands

Partly Displays the system MAC information of the peer
device.

Command

Description
Enables the LACP on the port and specifies theport-group key mode

Platform

aggregation group ID and operation mode.

N/A

Description

3-25

Command Reference

VLAN Commands

4 VLAN Commands
4.1 add interface
Use this command to add one or a group Access interface into current VLAN. Use the no or default
form of the command to remove the Access interface.
add interface { interface-type interface-number | range interface-type interface-range }no add interface { interface-type interface-number | range interface-type interface-range }default add interface { interface-type interface-number | range interface-type interface-range }Parameter
Description

Parameter

Description

interface-type interface-number

Layer-2 Ethernet interface or layer-2 AP port.

range interface-type interface-range

Range of the Layer-2 Ethernet interface or layer-2 AP
port.

Defaults

All layer-2 Ethernet interfaces are in the VLAN1.

Command

VLAN configuration mode.

mode

Usage Guide

This command is only valid for the access port.
The configuration of this command is the same as specifying the VLAN to which interface belongs in
the interface configuration mode (that is the switchport access vlan vlan-id command). For the twocommands of adding the interface to the VLAN, the command configured later will overwrite the one
configured before and take effect.
The configuration of adding the layer-2 AP into current VLAN through this command will only takeeffect for the layer-2 AP port, but not for the member port of the layer-2 AP port.

Configuration

The following example adds the interface GigabitEthernet 0/17 to VLAN20.

ExamplesRuijie# configure terminal
SwitchA(config)#vlan 20
SwitchA(config-vlan)#add interface GigabitEthernet 0/17
Ruijie# show interface GigabitEthernet 0/17 switchport
Interface Switchport----------

Mode--------

Access Native Protected----- -----

GigabitEthernet 0/17 enabled

ACCESS 20

VLAN lists---- ---------- ------1

DisabledALL

The following example adds the interface range GigabitEthernet 0/17-18 to VLA1200.
Ruijie# configure terminal
SwitchA(config)#vlan 100
SwitchA(config-vlan)#add interface range GigabitEthernet 0/17-18

4-1

Command Reference

VLAN Commands

Ruijie# show vlan
Ruijie#show vlan
VLAN

Name

StatusPorts---------- -------------------------------- --------- ----------------------------------1 VLAN0001

STATIC

Ghn0/1, Ghn0/2, Ghn0/3, Ghn0/4
Ghn0/5, Ghn0/6, Ghn0/7, Ghn0/8
Ghn0/9, Ghn0/10, Ghn0/11, Ghn0/12
Ghn0/13, Ghn0/14, Ghn0/15, Ghn0/16
Te0/19, Ag5, Ag2

20 VLAN0020

STATIC

100 VLAN0100

STATIC

Gi0/17, Gi0/18

4094 VLAN4094

STATICAg1

The following example adds the AggregatePort10 to VLAN20.
Ruijie# configure terminal
SwitchA(config)#vlan 20
SwitchA(config-vlan)#add interface aggregateport 10
Ruijie# show interface aggregateport 10 switchport
Interface Switchport----------

Mode--------

AggregatePort 10 enabled

RelatedCommands

Platform

Access Native Protected----- ----ACCESS 20

1

VLAN lists---- ---------- ------Disabled

ALL

Command

Description

show interface switchport

Displays the layer-2 interfaces.

N/A

Description

4.2 interface vlan
Use this command to creat a Switch Virtual Interface and enter the SVI configuration mode.
interface vlan vlan-id

Parameter
Description

Parameter

Description

vlan-id

VLAN ID

Defaults

By default, no SVI is configured.

Command

Global configuration mode

Mode

Usage Guide

N/A

4-2

Command Reference

VLAN Commands

Configuration

The following example enters the SVI configuration mode on VLAN 1.

ExamplesRuijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)#

RelatedCommands

Command

Description

N/A

N/A

4.3 nameUse this command to specify the name of a VLAN. Use the no or default form of this command torestore the default setting.
name vlan-nameno namedefault nameParameter
Description

Defaults

Parameter

Description

vlan-name

VLAN name

The default name of a VLAN is the combination of “VLAN” and VLAN ID, for example, the default
name of the VLAN 2 is “VLAN0002”.

Command

VLAN configuration Mode.

mode

Usage Guide

N/A

Configuration

The following example sets the name of VLAN to 10.

ExamplesRuijie(config)# vlan 10
Ruijie(config-vlan)# name vlan10

RelatedCommands

Platform

Command

Description

show vlan

Displays member ports of the VLAN.

N/ADescription

4-3

Command Reference

VLAN Commands

4.4 show vlan
Use this command to display member ports of the VLAN.
show vlan [ id vlan-id ]Parameter
Description

Parameter

Description

id vlan-id

VLAN ID

Defaults

N/A

Command

All modes

mode

Usage Guide

N/A

Configuration

The following command displays the status of VLAN 20.

ExamplesRuijie(config-vlan)#show vlan id 20
VLAN Name

Status---- --------------------------20 VLAN0020

-----

Ports
---------STATICAg10

The following command displays the status of all VLANs.
Ruijie(config-vlan)#show vlan
VLAN

Name

StatusPorts---------- -------------------------------- --------- ----------------------------------1 VLAN0001

STATIC

Ghn0/1, Ghn0/2, Ghn0/3, Ghn0/4
Ghn0/5, Ghn0/6, Ghn0/7, Ghn0/8
Ghn0/9, Ghn0/10, Ghn0/11, Ghn0/12
Ghn0/13, Ghn0/14, Ghn0/15, Ghn0/16
Te0/19, Ag5, Ag2

RelatedCommands

Platform

10 vlan10

STATIC

20 VLAN0020

STATICAg10

100 VLAN0100

STATIC

Gi0/17, Gi0/18, Ag1, Ag84094 VLAN4094

STATIC

Command

Description

name

VLAN name.

N/A

Description

4-4Command Reference

VLAN Commands

4.5 switchport access vlan
Use this command to configure an interface as a static access port and assign it to a VLAN. Use the noform of the command to assign the port to the default VLAN.
switchport access vlan vlan-id
no switchport access vlan
default switchport access vlan

Parameter
Description

Parameter

Description

vlan-id

The VLAN ID at which the port to be added.

Defaults

By default, the switch port is an access port and the VLAN is VLAN 1.

Command

Interface configuration mode.

mode

Usage Guide

Enter one VLAN ID. The system will create a new one and add the interface to the VLAN if you enter a
new VLAN ID. If the VLAN ID already exists, the command adds the port to the VLAN.
If the port is a trunk port, the operation does not take effect.

Configuration

Ruijie(config)# interface gigabitethernet 0/17

ExamplesRuijie(config-if-GigabitEthernet 0/17)# switchport access vlan 2

RelatedCommands

Platform

Command

Description

switchport mode

Specifies the interface as Layer 2 mode (switch port mode).

N/A

Description

4.6 switchport modeUse this command to specify a L2 interface (switch port) mode. You can specify this interface to be anaccess port or a trunk port or a servicechain port. Use the no or default form of this command torestore the default setting.
switchport mode { access | trunk }no switchport mode
default switchport mode

Parameter
Description

Parameter

Description

accessConfigures the switch port as an access port.

4-5Command Reference

trunk

VLAN Commands

Configures the switch port as a trunk port.

Defaults

By default, the switch port is an access port.

Command

Interface configuration mode.

mode

Usage Guide

If a switch port is an access port, the port can be added only to one VLAN. You can run theswitchport access vlan command to specify the VLAN to which the port belongs.
If a switch port is a trunk port, the port is added to all VLANs by default. You can also run theswitchport trunk allowed command to add the port to or remove the port from a specified VLAN.

Configuration

The following example configures port 17 as an access port.

ExamplesRuijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode access
The following example configures port 17 as a trunk port.
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk

RelatedCommands

Platform

Command

Description

switchport

Configures a Layer 2 interface.

N/A

Description

4.7 switchport trunk allowed vlan
Use this command to add the trunk/uplink port to the VLAN or remove a trunk/uplink port from the
VLAN. Use the no or default form of the command to restore the default setting.
switchport trunk allowed vlan { all | add vlan-list | remove vlan-list | except vlan-list | onlyvlan-list }no switchport trunk allowed vlan
default switchport trunk allowed vlan

Parameter
Description

Parameter

Description

all

Adds the trunk/uplink port to all VLANs.

add vlan-list

Adds the trunk/uplink port to the specified VLAN.

remove vlan-list

Removes the trunk/uplink port from the specified VLAN.

except vlan-list

Removes the trunk/uplink port from the specified VLAN and adds the

4-6Command Reference

VLAN Commands

port to all the other VLANs.
only vlan-list

Adds the trunk/uplink port to the specified VLAN and removes theport from the VLANs not on the VLAN list.

Defaults

The trunk port is in all VLANs by default.

Command

Interface configuration mode.

mode

Usage Guide

A trunk port transmits all VLAN (1-4094) data by default. You can block some VLAN data byconfiguring this command. Use the show interfaces command to display configuration.

Configuration

The following example removes trunk port GigabitEthernet 0/17 from VLAN 2.

ExamplesRuijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# switchport trunk allowed vlan remove 2

The following example removes trunk port GigabitEthernet 0/17 from VLAN 2.
Ruijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport trunk allowed vlan except 10

RelatedCommands

Platform

Command

Description

switchport mode

Specifies an interface as a Layer 2 interface (switch port mode).

N/A

Description

4.8 switchport trunk native vlan
Use this command to configure the native VLAN for the trunk/uplink port. Use the no or default formof this command to restore the default setting.
switchport trunk native vlan vlan-id
no switchport trunk native vlan
default switchport trunk native vlan

Parameter
Description

Parameter

Description

vlan-id

Native VLAN ID.

Defaults

By default, the native VLAN for the trunk/uplink port is VLAN 1.

Command

Interface configuration mode

4-7

Command Reference

VLAN Commands

mode

Usage Guide

After this function is enabled, packets not tagged with VLAN ID are taken as native VLAN packets.
Tags are removed from native VLAN packets going out on the trunk port.

Configuration

The following example configures VLAN 10 as the native VLAN for trunk port GigabitEthernet 0/17.

ExamplesRuijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# switch trunk native vlan 10
The following example configures VLAN 10 as the native VLAN for unlink port GigabitEthernet 0/17.
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode uplink
Ruijie(config-if-GigabitEthernet 0/17)# switch trunk native vlan 10

RelatedCommands

Platform

Command

Description

switchport mode

Specifies an interface as a Layer 2 interface (switch port mode).

N/A

Description

4.9 vlan
Use this command to enter the VLAN configuration mode. Use the no or default form of thiscommand to restore the default setting.
vlan { vlan-id | range vlan-range }no vlan { vlan-id | range vlan-range }default vlan { vlan-id | range vlan-range }Parameter
Description

Parameter

Description

vlan-id

VLAN ID, in the range from 1 to 4094.Default VLAN (VLAN 1) cannot
be removed.

range vlan-range

Defaults

The default is static VLAN.

Command

Global configuration mode.

VLAN ID range.

mode

Usage Guide

N/A

Configuration

The following example creates VLAN 10.

ExamplesRuijie(config)# vlan 10

4-8

Command Reference

VLAN Commands

Ruijie(config-vlan)#

RelatedCommands

Platform

Command

Description

show vlan

Displays member ports of the VLAN.

N/ADescription

4-9

Command Reference

Protocol VLAN Commands

5 Protocol VLAN Commands(beta)
5.1 protocol-vlan ipv4 mask vlan
Use this command to configure VLAN for the specified subnet.
protocol-vlan ipv4 address mask address vlan vlan-id
Use this command to remove VLAN configuration for the specified subnet.
no protocol-vlan ipv4 address mask address
Use this command to remove VLAN configuration for all subnets.
no protocol-vlan ipv4

Parameter
Description

Parameter

Description

ipv4 address

IP address in the A.B.C.D format.

mask mask

IP subnet mask in the A.B.C.D format.

vlan vlan-id

VLAN ID. The value ranges from 1 to 4094.

Defaults

It is disabled by default.

Command

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example configures VLAN 100 for the specified subnet.

ExamplesRuijie(config)# protocol-vlan ipv4 192.168.100.3 mask 255.255.255.0 vlan 100

RelatedCommands

Platform

Command

Description

show protocol-vlan ipv4

N/A

N/A

Description

5.2 protocol-vlan ipv4
Use this command to enable subnet VLAN. Use the no form of this command to restore the default
setting.
protocol vlan ipv4
no protocol vlan ipv4

5-1

Command Reference

Parameter
Description

Protocol VLAN Commands

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode.

mode

Usage Guide

An interface must work in Trunk/Hybrid mode.
The feature is not supported by G.hn ports.

Configuration

The following example enables the subnet VLAN.

ExamplesRuijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# protocol-vlan ipv4

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

5.3 protocol-vlan profile
Use this command to configure the profile for the VLAN.
protocol-vlan profile number frame-type { EtherII ether-type type | SNAP ether-type type | LLC
dsap value ssap value }Use this command to delete the specified profile.
no protocol-vlan profile number
Use this command to delete all profiles.
no protocol-vlan profile

Parameter
Description

Parameter

Description

profile number

Profile indexes. The value ranges from 1 to 16.

frame-type

Type of message, including EtherII, SNAP and LLC.

ether-type typeType of Ethernet II or SNAP. The value ranges from 1501 to 65535.

dsap value ssap value

Service access point type. The value ranges from 0 to 255.

5-2

Command Reference

Defaults

It is disabled by default.

Command

Global configuration mode.

Protocol VLAN Commands

mode

Usage Guide

N/A

Configuration

The following example configures the profile for the VLAN.

ExamplesRuijie(config)# protocol-vlan

profile 1 frame-type ETHERII ether-type aarp

Ruijie(config)# protocol-vlan

profile 2 frame-type LLC DSAP 255 SSAP 255

RelatedCommands

Platform

Command

Description

show protocol-vlan

N/A

N/A

Description

5.4 protocol-vlan profile vlan
Use this command to apply some profile to an interface.
protocol-vlan profile number vlan vlan-id
Use this command to clear the specified profile on the port.
no protocol-vlan profile number
Use this command to clear all profiles on the port.
no protocol-vlan profile

Parameter
Description

Parameter

Description

numberProfile indexes. The value ranges from 1 to 16.

vlan id

VLAN ID. The value ranges from 1 to 4094.

Defaults

This function is disabled by default.

Command

Interface mode.

mode

Usage Guide

The interface must be in Trunk or Hybrid mode.
The feature is not supported by G.hn ports.

Configuration

The following example applies profile 1 to VLAN 101.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# protocol-vlan profile 1 vlan 101

5-3

Command Reference

RelatedCommands

Protocol VLAN Commands

Command

Description

show protocol-vlan

N/A

N/A

Platform
Description

5.5 show protocol-vlan
Use this command to display a protocol VLAN.
show protocol-vlan [ profile [ number ] | ipv4 ]Parameter
Description

Parameter

Description

profile [ number ]The profile index number ranges from 1 to 16.
Display all profile for the VLAN without the number.
Display the specified profile for the VLAN with the number.
Display the VLAN for the specified subnet.

ipv4

Defaults

N/A

CommandPrivileged EXEC mode.

mode

Usage Guide

N/A

Configuration

The following example displays the configuration of protocol VLAN.

ExamplesRuijie#show protocol-vlan
ip

mask

vlan

--------------- --------------- ---1.2.1.0

255.255.255.0

interface5

ipv4 status-------------------- ----------Gi0/17

enableprofile frame-type

ether-type/DSAP+SSAP

interfacevlan------- ---------------- ---------------------- --------------- ---1

ETHERII

0x5fa
Gi0/17

5-4

12

Command Reference

RelatedCommands

Protocol VLAN Commands

Command

Description

N/A

N/A

Platform
Description

5-5Command Reference

Protocol VLAN Commands

6 Private VLAN Commands(beta)
6.1 debug bridge pvlan
Use this command to enable private VLAN debugging. Use the no or default form of this command torestore the default setting.
debug bridge pvlan
no debug bridge pvlan

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

Debugging is disabled by default.

CommandPrivileged EXEC mode

mode

Usage Guide

Debugging information includes error and prompt messages appearing during private VLAN
configuration.
This command can be used to troubleshoot VLAN and interface configuration failure.
With private VLAN debugging enabled, all super VLAN configuration and packet processing on
SVI is displayed.
Debugging information helps troubleshooting and fault location.

Configuration

The following example enables private VLAN debugging.

ExamplesRuijie# debug bridge pvlan
The following example disables private VLAN debugging.
Ruijie# no debug bridge pvlan

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

6.2 private-vlan
Use this command to configure the private VLAN feature. Use the no or default form of this6-1

Command Reference

Protocol VLAN Commands

command to restore the default setting.
private-vlan { community | isolated | primary }no private-vlan { community | isolated | primary }default private-vlan { community | isolated | primary }Parameter
Description

Parameter

Description

community

Sets the community VLAN.

isolated

Sets the isolated VLAN.

primary

Sets the primary VLAN.

Defaults

No private VLAN feature is configured by default.

Command

VLAN configuration mode

mode

Usage Guide

N/A

Configuration

The following example configures the private VLAN feature.

ExamplesRuijie(config)#vlan 90
Ruijie(config-vlan)#private-vlan primary
Ruijie(config-vlan)#vlan 91
Ruijie(config-vlan)#private-vlan isolated
Ruijie(config-vlan)#vlan 92
Ruijie(config-vlan)#private-vlan community
The following example disables the private VLAN feature using the no private-vlan command.
Ruijie(config)#vlan 90
Ruijie(config-vlan)#no private-vlan primary
Ruijie(config-vlan)#vlan 91
Ruijie(config-vlan)#no private-vlan isolated
Ruijie(config-vlan)#vlan 92
Ruijie(config-vlan)#no private-vlan community
The following example disables the private VLAN feature using the default private-vlan command.
Ruijie(config)#vlan 90
Ruijie(config-vlan)#default private-vlan primary
Ruijie(config-vlan)#vlan 91
Ruijie(config-vlan)#default private-vlan isolated
Ruijie(config-vlan)#vlan 92
Ruijie(config-vlan)#default private-vlan community

RelatedCommands

Command

Description

N/A

N/A

6-2

Command Reference

Platform

Protocol VLAN Commands

N/A

Description

6.3 private-vlan association
Use this command to associate the secondary VLAN with the primary VLAN on layer 2. Use the no or
default form of this command to restore the default setting.
private-vlan association { [ add ] secondary-vlan-list | remove secondary-vlan-list }no private-vlan association
default private-vlan association

Parameter
Description

Parameter

Description

add secondary-vlan-list

Adds the associated secondary VLAN.

remove secondary-vlan-list

Removes the associated secondary VLAN.

Defaults

This function is disabled by default.

Command

VLAN configuration Mode.

mode

Usage Guide

N/A

Configuration

The following example associates the secondary VLAN with the primary VLAN on layer 2.

ExamplesRuijie(config)# vlan 22
Ruijie(config-vlan)# private-vlan association add 24-26

The following example removes the association between the secondary VLAN with the primary
VLAN.
Ruijie(config)# vlan 22
Ruijie(config-vlan)# private-vlan association remove 24

RelatedCommands

Platform

Command

Description

show vlan private-vlan

N/A

N/A

Description

6.4 private-vlan mapping
Use this command to associate the secondary VLAN with the primary VLAN on layer 3. Use the no or
default form of this command to restore the default setting.

6-3

Command Reference

Protocol VLAN Commands

private-vlan mapping { [ add ] secondary-vlan-list | remove secondary-vlan-list }no private-vlan mapping
default private-vlan mapping

Parameter
Description

Parameter

Description[ add ] secondary-vlan-list

Adds the associated secondary VLAN.

remove secondary-vlan-list

Removes the associated secondary VLAN.

Defaults

This function is disabled by default.

Command

The interface mode corresponding to the primary VLAN

mode

Usage Guide

N/A

Configuration

The following example associates the secondary VLAN with the primary VLAN on layer 3.

ExamplesRuijie(config)# interface vlan 22
Ruijie(config-if-VLAN 22)# private-vlan mapping add 24-26

RelatedCommands

Platform

Command

Description

show vlan private-vlan

N/A

N/A

Description

6.5 show vlan private-vlan
Use this command to display the private VLAN configuration.
show vlan private-vlan [ community | primary | isolated ]Use this command to display all the private VLANs configuration.
show vlan private-vlan

Parameter
Description

Defaults

Parameter

Description

primary

Displays the primary VLAN information.

community

Displays the community VLAN information.

isolated

Displays the isolated VLAN information.

N/A

6-4

Command Reference

CommandProtocol VLAN Commands

All modes

mode

Usage Guide

N/A

Configuration

The following example displays the private VLAN configuration.

ExamplesRuijie# show vlan private-vlan
VLAN

Type

StatusRoutedPorts

Associated VLANs----- ---------- -------- -------- ------------------------------ ------------------

RelatedCommands

Platform

30

primary

inactive Enabled31

isolated

inactive Disabled

No Association

90

primary

activeDisabled

91-92

91

isolated

activeDisabled

90

92

community active

Disabled Gi0/17

90Command

Description

N/A

N/A

N/A

Description

6.6 switchport mode private-vlan
Use this command to declare the private VLAN mode of the interface. Use the no or default form of
this command to restore the default setting.
switchport mode private-vlan { host | promiscuous }no switchport mode
default switchport mode

Parameter
Description

Parameter

Description

host

Host mode of the private VLAN

promiscuous

Promiscuous mode of the private VLAN

Defaults

The port is an access port by default.

Command

Interface configuration mode.

mode

Usage Guide

Before a port is configured as an isolated port or promiscuous port, and the port mode must be
configured as the host port mode.
The port mode must be configured as the promiscuous mode.

6-5

Command Reference

Protocol VLAN Commands

Configuration

The following example applies the private host mode to the interface.

ExamplesRuijie(config)# interface gigabitEthernet0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode private-vlan host

The following example applies the promiscuous mode to the interface.
Ruijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#sw mode private-vlan promiscuous

RelatedCommands

Platform

Command

Description

show vlan private-vlan

N/A

N/A

Description

6.7 switchport private-vlan association trunk
Use this command to configure the trunk port as an isolated trunk port and associate it with a primary
VLAN and its associated isolated VLAN on layer 2. Use the no or default form of this command torestore the default settings.
switchport private-vlan association trunk primary-vlan-id isolated-vlan-id
no switchport private-vlan association trunk [ primary-vlan-id isolated-vlan-id ]default switchport private-vlan association trunk [ primary-vlan-id isolated-vlan-id ]Parameter
Description

Parameter

primary-vlan-id

isolated-vlan-id

Description
The ID of the primary VLAN associated with an isolated VLAN. The
VLAN ID ranges from 2 to 4094.
The ID of the isolated VLAN associated with a primary VLAN. The
VLAN ID ranges from 2 to 4094.

Defaults

The trunk port is not an isolated trunk port and associated with no VLAN by default.

Command

Interface configuration mode.

mode

Usage Guide

Configure a trunk port as an isolated trunk port.
Associate the isolated VLAN with the primary VLAN on layer 2.
A private VLAN contains up to one isolated VLAN. So a private VLAN can be associated with up to
one primary VLAN and its associated isolated VLAN.
More than one private VLANs are supported. So an isolated port can be configured with more than

6-6

Command Reference

Protocol VLAN Commands

one primary VLANs and their associated isolated VLANs.

Configuration

The following example configures GigabitEthernet 0/17 as an isolated trunk port associated with two

Examplesprimary VLANs and their associated isolated VLANs,
Ruijie> enable
Ruijie# configure terminal
Ruijie(config)# vlan 5
Ruijie(config-vlan)# private-vlan isolated
Ruijie(config-vlan)# exit
Ruijie(config)# vlan 2
Ruijie(config-vlan)# private-vlan primary
Ruijie(config-vlan)# private-vlan association add 5
Ruijie(config-vlan)# exit
Ruijie(config)# vlan 9
Ruijie(config-vlan)# private-vlan isolated
Ruijie(config-vlan)# exit
Ruijie(config)# vlan 6
Ruijie(config-vlan)# private-vlan primary
Ruijie(config-vlan)# private-vlan association add 9
Ruijie(config-vlan)# exit
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# switchport private-vlan association trunk 2 5
Ruijie(config-if-GigabitEthernet 0/17)# switchport private-vlan association trunk 6 9

RelatedCommands

Platform

Command

Description

show vlan private-vlan

N/A

N/A

Description

6.8 switchport private-vlan host-association
Use this command to associate the secondary VLAN with the primary VLAN. Use the no or default
form of this command to restore the default setting.
switchport private-vlan host-association primary-vlan-id secondary-vlan-id
no switchport private-vlan host-association
default switchport private-vlan host-association

Parameter
Description

Parameter

Description

primary-vlan-id

Primary VLAN ID.

6-7

Command Reference

secondary-vlan-id

Protocol VLAN Commands

Secondary VLAN ID.

Defaults

This function is disabled by default.

Command

Interface configuration mode.

mode

Usage Guide

Before a port is configured as an isolated port or promiscuous port, and the port mode must be
configured as the host port mode.
Whether a port is configured as an isolated port or community port depends on the secondary-vlan-id
parameter.
primary-vlan-id and secondary-vlan-id must be respectively the IDs of the primary VLAN andsecondary VLAN in a PVLAN pair, on which Layer-2 association is performed.
One host port can be associated with only one PVLAN pair.

Configuration

The following example associates the secondary VLAN with the primary VLAN on the host port.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode private-vlan host
Ruijie(config-if-GigabitEthernet 0/17)# switchport private-vlan host-association 22 23
Ruijie(config-if-GigabitEthernet 0/17)# default switchport private-vlan host-asscioation
Ruijie(config-if-GigabitEthernet 0/17)# switchport private-vlan host-association 22 25

RelatedCommands

Platform

Command

Description

show vlan private-vlan

N/A

N/A

Description

6.9 switchport private-vlan mapping
Use this command to associate the promiscuous port with a primary VLAN and its associatedsecondary VLANs.. Use the no or default form of this command to restore the default settings.
switchport private-vlan mapping primary-vlan-id { [ add ] secondary-vlan-list | remove
secondary-vlan-list }no switchport private-vlan mapping
default switchport private-vlan mapping

Parameter
Description

Parameter

Description

primary-vlan-id

Primary VLAN ID.

[ add ] secondary-vlan-list

Adds a list of secondary VLANs.

6-8

Command Reference

remove secondary-vlan-list

Protocol VLAN Commands

Removes a list of secondary VLANs.

Defaults

The promiscuous port is associated with no VLAN by default.

Command

Interface configuration mode

mode

Usage Guide

The port should be a promiscuous port.
The primary VLAN and secondary VLAN should be associated on layer 2.

Configuration

The following example configures GigabitEthernet 0/17 as a promiscuous port and associates

Examplesit with primary VLAN 22 and secondary VLANs 23-25.
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode private-vlan promiscuous
Ruijie(config-if-GigabitEthernet 0/17)# switchport private-vlan mapping 22 add 23-25

RelatedCommands

PromptCommand

Description

show vlan private-vlan

N/A

1. If the specified VLAN is not a primary VLAN.
Operation is not supported on interface GigabitEthernet 0/1: the primary vlan doesn't exist!
2. If the primary VLAN and secondary VLAN are not associated on layer 2.
The vlan pair(22-23) is invalid!

Common1. The primary VLAN and secondary VLAN are not associated on layer 2.

Error

2. The associated primary VLAN and secondary VLAN have no private VLAN attribute or attribute iswrong.

6.10 switchport private-vlan promiscuous trunk
Use this command to configure the trunk port as a promiscuous trunk port and associate it with a
primary VLAN and its associated isolated VLAN on layer 2. Use the no or default form of thiscommand to restore the default settings.
switchport private-vlan promiscuous trunk primary-vlan-id secondary-vlan-list
no switchport private-vlan promiscuous trunk primary-vlan-id secondary-vlan-list
default switchport private-vlan promiscuous trunk primary-vlan-id secondary-vlan-list

Parameter
Description

Parameter

primary-vlan-id

secondary-vlan-list

Description
The ID of the primary VLAN associated with a secondary VLAN. The
VLAN ID ranges from 2 to 4094.
The list of the secondary VLANs associated with a primary VLAN.
The VLAN ID ranges from 2 to 4094. Use commas(,) to separate

6-9

Command Reference

Protocol VLAN Commands

VLANs and use a hyphen (-) to connect consecutive VLANs.

Defaults

The trunk port is not a promiscuous trunk port and associated with no VLAN by default.

Command

Interface configuration mode

mode

Usage Guide

Configure a trunk port as a promiscuous trunk port.
Associate the secondary VLAN with the primary VLAN on layer 2.
A promiscuous port can be configured with more than one primary VLANs and their associatedsecondary VLANs.

Configuration

The following example configures GigabitEthernet 0/17 as a promiscuous trunk port associated with

Examplesprimary VLAN 202 and its associated isolated VLAN 203.
Ruijie> enable
Ruijie# configure terminal
Ruijie(config)# vlan 202
Ruijie(config-vlan)# private-vlan primary
Ruijie(config-vlan)# exit
Ruijie(config)# vlan 203
Ruijie(config-vlan)# private-vlan isolated
Ruijie(config-vlan)# exit
Ruijie(config)# vlan 202
Ruijie(config-vlan)# private-vlan association add 203
Ruijie(config-vlan)# exit
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# switchport private-vlan promiscuous trunk 202 203

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

6-10

Command Reference

MSTP Commands(beta)

7 MSTP Commands(beta)
7.1 bpdu src-mac-check
Use this command to enable the BPDU source MAC address check function on the interface. Use theno form of this command to disable the BPDU source MAC address check function on the interface.
bpdu src-mac-check mac-address
no bpdu src-mac-check

Parameter
Description

Parameter

mac-address

Description
Indicates that only the BPDU messages from this MAC address arereceived. The input format is H.H.H.

Defaults

The BPDU messages from any MAC address are received by default.

Command

Interface configuration mode.

Mode

Usage Guide

BPDU source MAC address check prevents BPDU packets from maliciously attacking switches andcausing MSTP abnormal. When the switch connected to a port on a point-to-point link is determined,
you can enable BPDU source MAC address check to receive BPDU packets sent only by the peerswitch and discard all other BPDU packets, thereby preventing malicious attacks. You can enable the
BPDU source MAC address check in interface configuration mode for a specific port. One port can
only filter one MAC address.

Configuration

The following example indicates only the BPDU with 00d0.f800.1e2f as the source MAC address will

Examplesbe received by interface GigabitEthernet 0/17 .
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# bpdu src-mac-check 00d0.f800.1e2f

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7-1

Command Reference

MSTP Commands(beta)

7.2 bridge-frame forwarding protocol bpdu
Use this command to enable BPDU transparent transmission. Use the no form of this command todisable BPDU transparent transmission.
bridge-frame forwarding protocol bpdu
no bridge-frame forwarding protocol bpdu

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

In the IEEE 802.1Q standard, 01-80-C2-00-00-00, the destination MAC address of BPDU frames, isreserved. Devices following the IEEE 802.1Q standard don’t forward BPDU frames. In real network
deployment, devices may be required to support BPDU transparent transmission. For example, whena device is not enabled with STP, BPDU transparent transmission can help implement STP
calculation.
BPDU transparent transmission works only when STP is disabled.

Configuration

The following example enables BPDU transparent transmission.

ExamplesRuijie(config)# bridge-frame forwarding protocol bpdu

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.3 clear spanning-tree counters
Use this command to clear the statistics of the sent and received STP packets.
clear spanning-tree detected-protocols [ interface interface-type interface-number ]Parameter
Description

Parameter

Description

interface interface-type interface-number

ID of the interface

7-2

Command Reference

Defaults

N/A

CommandPrivileged EXEC mode

MSTP Commands(beta)

Mode

Usage Guide

It is used to clear the statistics of the sent and received STP packets.

Configuration

The following example clears the statistics of the sent and received STP packets.

ExamplesRuijie# clear spanning-tree counters

The following example clears the statistics of the sent and received packets on interface
GigabitEthernet 0/1.
Ruijie# clear spanning-tree counters interface gigabitethernet 0/1

RelatedCommands

Platform

Command

Description

show spanning-tree counters

Displays the statistics of STP transceived packets.

N/A

Description

7.4 clear spanning-tree detected-protocols
Use this command to force the interface to send the RSTP BPDU message and check the BPDU
messages.
clear spanning-tree detected-protocols [ interface interface-type interface-number ]Parameter
Description

Parameter

Description

interface interface-type interface-number

ID of the interface

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

Use this command to force the interface to send the RSTP BPDU message.

Configuration

Forces to check the version of all interfaces.

ExamplesRuijie# clear spanning-tree detected-protocols

RelatedCommand

Description

7-3

Command Reference

MSTP Commands(beta)

Commands
Displays the STP configuration of the interface.

show spanning-tree interface

Platform

N/A

Description

7.5 clear spanning-tree mst topochange record
Use this command to clear STP topology change record.
clear spanning-tree mst instance-id topochange record

Parameter
Description

Parameter

Description

instance-id

Instance ID. For STP and RSTP protocols, only instance 0 is valid.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example clears STP topology change record.

ExamplesRuijie# show spanning-tree mst 0 topochange record
Topology change information on mst 0:
Time

Interface

Old status

New status

Type------------------- -------------------- ------------ ------------ ---------------2013.5.1 4:18:46

GI0/17

Learning

Forwarding

NormalRuijie# clear spanning-tree mst 0 topochange record
Ruijie# show spanning-tree mst 0 topochange record%There's no topology change information has been record on mst 0.
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.6 instanceUse this command to map VLANs to an instance. Use the no form of the command to restore thedefault setting.

7-4

Command Reference

MSTP Commands(beta)

instance instance-id vlan vlan-range
no instance instance-id [ vlan vlan-range ]Parameter
Description

Parameter

Description

instance-id

Instance ID, in the range from 0 to 64

vlan vlan-range

VLAN range, in the range from 1 to 4094.

Defaults

By default, only instance 0 exists and all VLANs are in instance 0.

Command

MST configuration mode

Mode

Usage Guide

instance instance-id vlan vlan-range: Add VLAN to MST instance. Instance-ID is in the range from 0
to 64 and VLAN is in the range from 1 to 4094. Use commas to separate VLAN IDs and use hyphen
to indicate VLAN range, e.g., instance 10 vlan 2,3,6-9, which adds VLAN 2, 3, 4, 5, 6, 7, 8, 9 to
instance 10. Use the no form of this command to remove VLAN from instance 1-64.
If you create 64 instances by stacking on a Ruijie device with a small memory (e.g., 64M), thememory may be undersized. It is recommended to limit stacking instance number.

Configuration

This example enters MST mode and maps VLAN 3 and 5-10 to MST instance1.

ExamplesRuijie(config)# spanning-tree mst configuration
Ruijie(config-mst)# instance 1 vlan 3, 5-10
Ruijie(config-mst)# show spanning-tree mst configuration
Multi spanning tree protocol : Enable
Name:

Revision : 0
Instance

Vlans Mapped-------------------------------

0

1-2,4,11-4094

1

3,5-10----------------------------------Ruijie(config-mst)# exit
Ruijie(config)#
The following example removes VLAN3 from instance 1.
Ruijie(config-mst)# no instance 1 vlan 3
The following example removes instance 1.
Ruijie(config-mst)# no instance 1

RelatedCommands

Platform

Command

Description

show spanning-tree mst configuration

Displays MST region information.

N/A

7-5

Command Reference

MSTP Commands(beta)

Description

7.7 l2protocol-tunnel stp
Use this command to enable BPDU TUNNEL globally. Use the no form of this command to disable
this function.
l2protocol-tunnel stp
no l2protocol-tunnel stp

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

If you want to BPDU TUNNEL globally, enable BPDU TUNNEL on the interface first.

Configuration

The following example enables BPDU TUNNEL globally.

ExamplesRuijie(config)# l2protocol-tunnel stp
Ruijie(config)# show l2protocol-tunnel stp
L2protocol-tunnel: stp Enable
L2protocol-tunnel destination mac address: 01d0.f800.0005

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.8 l2protocol-tunnel stp enable
Use this command to enable BPDU TUNNEL on the interface. Use the no form of this command todisable this function.
l2protocol-tunnel stp enable
no l2protocol-tunnel stp enable

Parameter
Description

Parameter

Description

7-6

Command Reference

MSTP Commands(beta)

N/A

N/A

Defaults

N/A

Command

Interface configuration mode

Mode

Usage Guide

If you want to BPDU TUNNEL globally, enable BPDU TUNNEL on the interface first.

Configuration

The following example enables BPDU TUNNEL on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# l2protocol-tunnel stp enable
Ruijie(config-if-GigabitEthernet 0/17)# show l2protocol-tunnel stp
L2protocol-tunnel: stp Enable
L2protocol-tunnel destination mac address: 01d0.f800.0005
GigabitEthernet 0/17 l2protocol-tunnel stp enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.9 l2protocol-tunnel stp tunnel-dmac
Use this command to configure the STP address for transparent transmission through BPDUTUNNEL. Use the no form of this command to restore the default setting.
l2protocol-tunnel stp tunnel-dmac mac-address
no l2protocol-tunnel stp tunnel-dmac

Parameter
Description

Parameter

Description
The STP address for transparent transmission. The available STP

mac-address

addresses include 01d0.f800.0005, 011a.a900.0005, 010f.e200.0003,
0100.0ccd.cdd0, 0100.0ccd.cdd1, and 0100.0ccd.cdd2.

Defaults

The defualt is 01d0.f800.0005.

Command

Global configuration mode

Mode

7-7

Command Reference

MSTP Commands(beta)

Usage Guide

N/A

Configuration

The following example configures the STP address for transparent transmission through BPDU

Examples

TUNNEL.
Ruijie(config)# l2protocol-tunnel stp tunnel-dmac 011a.a900.0005

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.10 name
Use this command to set the MST name. Use the no form of the command to restore the default
setting.
name nameno nameParameter
Description

Parameter

Description

name

MST name, up to 32 characters.

Defaults

The default is NULL.

Command

MST configuration mode

Mode

Usage Guide

N/A

Configuration

This example sets MST name to region1.

ExamplesRuijie(config)# spanning-tree mst configuration
Ruijie(config-mst)# name region1
Ruijie(config-mst)# show spanning-tree mst configuration
Multi spanning tree protocol : EnableName: region1

Revision : 0
Instance

Vlans Mapped-------- -------------------------------------------0: ALL

Ruijie(config-mst)# exit
Ruijie(config)#

7-8

Command Reference

RelatedCommands

Platform

MSTP Commands(beta)

Command

Description

show spanning-tree mst configuration

Displays MST region information

N/A

Description

7.11 revision
Use this command to set the revision number of MSTP region. Use the no form of the command torestore the default setting.
revision version
no revision

Parameter
Description

Parameter

Description

versionMST revision number, in the range from 0 to 65535.

Defaults

The default is 0.

Command

MST configuration mode

Mode

Usage Guide

N/A

Configuration

This example sets revision number to1.

ExamplesRuijie(config)# spanning-tree mst configuration
Ruijie(config-mst)# revision 1
Ruijie(config-mst)# show spanning-tree mst configuration
Multi spanning tree protocol : Enable
Name:

Revision : 1
Instance

Vlans Mapped-------- -------------------------------------------0: ALL

Ruijie(config-mst)# exit
Ruijie(config)#

RelatedCommands

Command

Description

show spanning-tree mst configuration

Displays MST region information

7-9

Command Reference

Platform

MSTP Commands(beta)

N/A

Description

7.12 show l2protocol-tunnel stp
Use this command to display BPDU TUNNEL configuration.
show l2protocol-tunnel stp

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode / Global configuration mode / Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays BPDU TUNNEL configuration.

ExamplesRuijie# show l2protocol-tunnel stp
L2protocol-tunnel: stp Enable
L2protocol-tunnel destination mac address:011a.a900.0005
GigabitEthernet 0/17 l2protocol-tunnel stp enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.13 show spanning-tree
Use this command to display the global spanning-tree configuration.
show spanning-tree [ counters | forward-time | hello-time | inconsistentports | max-age |max-hops | mst instance-id | pathcost method | summary | tx-hold-count ]Parameter
Description

Parameter

Description

counters

Displays the statistics of STP transceived packets.

forward-time

Displays BridgeForwardDelay.

7-10

Command Reference

MSTP Commands(beta)

hello-time

Displays BridgeHelloTime.

inconsistentports

Displays the blocked port due to root guard or loop guard.

max-age

Displays BridgeMaxAge.

max-hops

Displays the maximum hops of an instance.

mst instance-id

Displays MSTP information of an instance.

pathcost method

Displays the method used for calculating path cost.
Displays the information of MSTP instances and forwarding status of thesummaryinterfaces.

tx-hold-countDisplays TxHoldCount.

Defaults

N/A

CommandPrivileged EXEC mode, global configuration mode and interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the global spanning-tree configuration.

ExamplesRuijie# show spanning-tree hello-time

The following example displays the sent and received STP packets.
Ruijie# show spanning-tree counters---------------------- STP BPDU count ---------------------Port

Receive

Send

GigabitEthernet 0/17

0122594------------------------- STP TC or TCN count -------------------------

RelatedCommands

Platform

MSTID

Port

Receive

Send0

GigabitEthernet 0/17

00Command

Description

spanning-tree pathcost method

Configures the pathcost method.

spanning-tree

Configures STP basic settings globally

N/A

Description

7.14 show spanning-tree interface
Use this command to display the STP configuration of the interface, including the optional spanningtree.
show spanning-tree [ mst instance-id ] interface interface-type interface-number [ bpdufilter |7-11

Command Reference

MSTP Commands(beta)

bpduguard | link-type | portfast ]Parameter
Description

Parameter

Description

mst instance-id

Displays the instance ID, in the range from 0 to 64.

interface interface-type interface-number

Displays the interface ID.

bpdufilter

Displays the status of BPDU filter.

bpduguard

Displays the status of BPDU guard.

link-type

Displays the link type of an interface.

portfast

Displays the status of portfast.

Defaults

N/A

CommandPrivileged EXEC mode, global configuration mode and interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the STP configuration on interface GigabitEthernet 0/17.

ExamplesRuijie# show spanning-tree interface gigabitethernet 0/17
PortAdminPortFast : Disabled
PortOperPortFast : Disabled
PortAdminAutoEdge : Enabled
PortOperAutoEdge : Disabled
PortAdminLinkType : auto
PortOperLinkType : point-to-point
PortBPDUGuard : Disabled
PortBPDUFilter : Disabled
PortGuardmode : None###### MST 0 vlans mapped :ALL
PortState : forwarding
PortPriority : 128
PortDesignatedRoot : 32768.001a.a979.00ea
PortDesignatedCost : 0
PortDesignatedBridge :32768.001a.a979.00ea
PortDesignatedPortPriority : 128
PortDesignatedPort : 1
PortForwardTransitions : 1
PortAdminPathCost : 200000
PortOperPathCost : 200000
Inconsistent states : normal
PortRole : rootPort

7-12

Command Reference

RelatedCommands

Platform

MSTP Commands(beta)

Command

Description

spanning-tree bpdufilter

Enables the BPDU filter feature someone the interface.

spanning-tree portfast

Enables the portfast on the interface.

spanning-tree bpduguard

Enables the BPDU guard on the interface.

spanning-tree link-type

Configures the link type of the interface to point-to-point.

N/A

Description

7.15 show spanning-tree mst configuration
Use this command to display the information of MST and instances.
show spanning-tree mst configuration

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays the information of MST and instances.

ExamplesRuijie# show spanning-tree mst configuration
Multi spanning tree protocol : EnableName: testRevision : 0
Instance

Vlans Mapped-------- -------------------------------------------0: 2-40941: 1

Field Description
Field

Description

Multi spanning tree protocol

Enables MSTP protocol.

Name

Name of the MST region

Revision

Revision of the MST region

Instance Vlans Mapped

Mapping relation between the instance and
VLAN

7-13

Command Reference

RelatedCommands

MSTP Commands(beta)

Command

Description

spanning-tree mst configuration

Configures the MST region.
Configures instance and VLAN mapping

instance

relations
Configures the MST name

name

Configures the revision number of MSTP

revision

Platform

region.

N/A

Description

7.16 show spanning-tree mst topochange record
Use this command to display the STP topology change record.
show spanning-tree mst instance-id topochange record

Parameter
Description

Parameter

Description

instance-id

Instance ID.

Defaults

N/A

CommandPrivileged EXEC mode / Global configuration mode / Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays the STP topology change record of instance 0.

ExamplesRuijie# show spanning-tree mst 0 topochange record
Topology change information on mst 0:
Time

Interface

Old status

New status

Type------------------- -------------------- ------------ ------------ ---------------2013.5.1 4:18:46

Gi0/17

Learning

Forwarding

Field

Description

Time

The time when the topology changes.

Interface

The interface whose topology changes.

Old status

Old STP status on the interface.

New status

New STP status on the interface.

Type

Topology change may be caused by the following causes:

Normal

Normal: UP/DOWN state change on the interface,

LoopGuard Block: Loop-inconsistence causes the interface to be blocked.

7-14

Command Reference

MSTP Commands(beta)

RootGuard Block: Root-inconsistence causes the interface to be blocked.

Inferior Block: Receiving inferior BPDU frames causes the interface to be
blocked.



LoopGuard Unblock: The interface returns to Forward status fromloop-inconsistence. RootGuard Unblock: The interface returns to Forward
status from root-inconsistence.



Inferior Unblock-The interface returns to Forward status after not receiving
inferior BPDU frames.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.17 spanning-tree
Use this command to enable MSTP and configure its basic settings globally. The no form of thecommand disables the spanning-tree function. The no form of the command with parameters only
restores the corresponding parameters to the default values, but does not disable the spanning-tree
function.
spanning-tree [ forward-time forward | hello-time hello | max-age age | max-hops hop-count |tx-hold-count tx-hold-count ]no spanning-tree [ forward-time | hello-time | max-age | max-hops | tx-hold-count ]Parameter
Description

Parameter

Description

forward-time forward

Interval at which the port status changes, in the range from 4 to 30 in
the unit of seconds. The default is 15.

hello-time helloInterval at which the switch sends the BPDU message, in the range
from 1 to 10 in the unit of seconds. The default is 2.

max-age age

Maximum aging time of the BPDU message, in the range from 6 to 40
in the unit of seconds. The default is 20.

max-hops hop-countNumber of hops in a region that the BPDU message passes before
being dropped. The value range is from 1 to 40 in the unit of hops.
The default is 20.

tx-hold-count tx-hold-countMaximum number of the BPDU messages sent in one second, in therange from 1 to 10. The default is 3.

Defaults

This function is disabled by default.

Command

Global configuration mode.

7-15

Command Reference

MSTP Commands(beta)

Mode

Usage Guide

The values of forward-time, hello time and max-age are interrelated. Modifying one of these threeparameters will affect the others. There is a restricted relationship among the above three values.
2x(Hello Time+1.0 second) ≤ Max-Age Time ≤ 2x(Forward-Delay-1.0 second)
If the values do not according with the condition, the settings do not work.

In the region, the BPDU message sent by the root bridge includes a Hot Count field. When the BPDU
message passes a device, the Hop Count is decreased by 1 until it reaches 0, which indicates the
BPDU message timed out. The device will drop the BPDU message whose Hop Count is 0.
Use parameter max-hops hop-count to set the maximum number of hops(Max-hopsCount) of the
BPDU message in the global configuration mode. Use the no form of this command to restore thedefault setting. This parameter takes effect for all instances.

Use parameter tx-hold-count tx-hold-count to configure the TxHoldCount of the STP. Use the noform of this command to restore the default setting.

Configuration

The following example enables the spanning-tree function.

ExamplesRuijie(config)# spanning-tree
The following example configures the BridgeForwardDelay.
Ruijie(config)# spanning-tree

forward-time 10

The following example sets the max-hops of the spanning tree to 10 for all instances.
Ruijie(config)# spanning-tree

max-hops 10

The following example sets the maximum number of the BPDU messages sent in one second.
Ruijie(config)# spanning-tree tx-hold-count 5

RelatedCommands

Platform

Command

Description

show spanning-tree

Displays the global STP configuration.

N/A

Description

7.18 spanning-tree autoedge
Use this command to enable Autoedge on the interface. Use the disabled form of this command todisable this function.
spanning-tree autoedge [ disabled ]Parameter
Description

Parameter

Description

disabled

Disabled Autoedge on the interface.

7-16

Command Reference

MSTP Commands(beta)

Defaults

This function is enabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

If the designated port of a device does not receive a BPDU from the downlink port within a specificperiod (3 seconds), the device regards a network device connected to the designated port, configures
the port as an edge port, and switches the port directly into the forwarding state. The edge port will be
automatically identified as a non-edge port after receiving a BPDU.
You can run the spanning-tree autoedge disabled command to disable Auto Edge.

Configuration

The following example disables Autoedge on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree autoedge disabled

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the STP configuration information of the interface.

N/A

Description

7.19 spanning-tree bpdufilter
Use this command to enable BPDU filter on the interface. You can use the enabled or disabled
option of the command to enable or disable the BPDU filter function on the interface.
spanning-tree bpdufilter { enabled | disabled }Parameter
Description

Parameter

Description

enabledEnables BPDU filter on the interface.

disabled

Disables BPDU filter on the interface.

Defaults

This function is disabled by default,

Command

Interface configuration mode.

Mode

Usage Guide

If BPDU filter is enabled on a port, the port neither sends nor receives BPDUs.

Configuration

The following example enables BPDU filter on interface GigabitEthernet 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree bpdufilter enable

7-17

Command Reference

RelatedCommands

Platform

MSTP Commands(beta)

Command

Description

show spanning-tree interface

Displays the STP configuration of the interface.

N/A

Description

7.20 spanning-tree bpduguard
Use this command to enable the BPDU guard function on the interface. You can use the enabled or
disabled option of the command to enable or disable the BPDU guard function on the interface.
spanning-tree bpduguard { enabled | disabled }Parameter
Description

Parameter

Description

enabledEnables BPDU guard on the interface.

disabled

Disables BPDU guard on the interface.

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

1.

If BPDU guard is enabled on a port, the port enters the error-disabled state after receiving a
BPDU.

2.

Run command errdisable recovery [ interval time ] to recover the interface in Error-disabledstate.

Configuration

The following example enables the BPDU guard function on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree bpduguard enable

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the STP configuration of the interface.

N/A

Description

7.21 spanning-tree compatible enable
Use this command to send the message selectively carried with MSTI according to the interface

7-18

Command Reference

MSTP Commands(beta)attribute of current port to realize interconnection with other vendors. Use the no form of thiscommand to restore the default setting.
spanning-tree compatible enable
no spanning-tree compatible enable

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default. .

Command

Interface configuration mode.

Mode

Usage Guide

If the compatibility mode is enabled on a port, this port will add different MSTI information into the
to-be-sent BPDU based on the current port to realize interconnection between Ruijie devices andother SPs' devices.

Configuration

The following example enables the compatibility mode on interface GigabitEthernet 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#spanning-tree compatible enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.22 spanning-tree cost
Use this command to set the path cost of an instance in the interface configuration mode. Use the noform of the command to restore the default setting.
spanning-tree [ mst instance-id ] cost costno spanning-tree [ mst instance-id ] cost

Parameter
Description

Defaults

Parameter

Description

mst instance-id

Instance ID in the range from 0 to 64. The default instance-id is 0.

cost cost

Path cost in the range from 1 to 200,000,000.

The default value is calculated by the link rate of the interface automatically based on the IEEE
802.1T Long standard.

7-19Command Reference

Command

MSTP Commands(beta)1000 Mbps—20000



100 Mbps—200000



10 Mbps—2000000

Interface configuration mode.

Mode

Usage Guide

A higher cost value means a higher path cost.
You can verify your settings by runnning the show spanning-tree [ mst instance-id ] interface
interface-type interface-number command in the privileged EXEC mode.

Configuration

This example sets the path cost to 400 on the interface associated with instances 3.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree mst 3 cost 400

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the MSTP information of an interface.

N/A

Description

7.23 spanning-tree guard loop
Use this command to enable loop guard on the interface to prevent the root port or backup port fromgenerating loop since they cannot receive bpdu. Use the no form of this command to disable loop
guard.
spanning-tree guard loopno spanning-tree guard loop

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

1.

Enabling loop guard on a root port or backup port will prevent possible loops caused by BPDU
receipt failure.

2.

Configuration

The loop guard function and root guard function cannot be enabled at the same time.

The following example enables loop guard on interface GigabitEthernet 0/17.

7-20

Command Reference

ExamplesMSTP Commands(beta)

Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree guard loop

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.24 spanning-tree guard none
Use this command to disable guard on the interface. Use the no form of this command to enable thisfunctionspanning-tree guard none
no spanning-tree guard none

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example disables guard on interface GigabitEthernet 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree guard none

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.25 spanning-tree guard root
Use this command to enable root guard on the interface to prevent the change of current root bridge
position because of error configuration and illegal packet attack. Use the no form of this command to

7-21

Command Reference

MSTP Commands(beta)

restore the default setting.
spanning-tree guard rootno spanning-tree guard root

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

1.

If root guard is enabled, the current root bridge will not change due to incorrect configuration orillegal packet attacks.

2.

The loop guard function and root guard function cannot be enabled at the same time.

Configuration

The following example enables root guard on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree guard root

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.26 spanning-tree ignore tc
Use this command to enable the tc filtering on the interface. Use the no form of this command torestore the default setting. With tc filtering enabled, the TC packets received on the interface will not
be processed.
spanning-tree ignore tc
no spanning-tree ignore tc

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode.

7-22

Command Reference

MSTP Commands(beta)

Mode

Usage Guide

If TC filter is enabled on a port, the port does not process received TC packets.

Configuration

The following example enables the tc filtering on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree ignore tc

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.27 spanning-tree link-type
Use this command to configure the link type of the interface. Use the no form of this command torestore the default setting.
spanning-tree link-type { point-to-point | shared }no spanning-tree link-type

Parameter
Description

Defaults

Parameter

Description

point-to-point

Sets the link type of the interface to point-to-point.

sharedForcibly sets the link type of the interface to shared.

For a full-duplex interface, its link type is set to point-to-point link; for a half-duplex interface, its link
type is set to shared.

Command

Interface configuration mode.

Mode

Usage Guide

If the link type of a port is point-to-point connection, RSTP can rapidly converge. If the link type is notconfigured, the device automatically sets the link type based on the duplex mode of the port.

Configuration

The following example configures the link type of the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree link-type point-to-point

RelatedCommands

Command

Description

show spanning-tree interface

Displays the STP configuration of the interface.

7-23

Command Reference

Platform

MSTP Commands(beta)

N/A

Description

7.28 spanning-tree loopguard default
Use this command to enable loop guard globally to prevent the root port or backup port fromgenerating loop since they cannot receive bpdu. Use the no form of this command to restore thedefault setting.
spanning-tree loopguard default
no spanning-tree loopguard default

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

Enabling loop guard on a root port or backup port will prevent possible loops caused by BPDU receipt
failure.

Configuration

The following example enables loop guard globally to prevent the root port or backup port from

Examplesgenerating loop since they cannot receive bpdu.
Ruijie(config)# spanning-tree loopguard default

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.29 spanning-tree modeUse this command to set the STP version. Use the no form of the command to restore the default
setting.
spanning-tree mode { stp | rstp | mstp }no spanning-tree mode

Parameter

Parameter

Description

7-24

Command Reference

MSTP Commands(beta)

Description

Defaults

stp

Spanning tree protocol(IEEE 802.1d)

rstp

Rapid spanning tree protocol(IEEE 802.1w)

mstp

Multiple spanning tree protocol(IEEE 802.1s)

The default is mstp.

CommandMode

Global configuration mode.

Usage Guide

However, some vendors' devices do not work according to 802.1 protocol standards, possibly
causing incompatibility. If other vendors' devices are incompatible with Ruijie devices, run thiscommand to switch the STP mode to a lower version.

Configuration

The following example sets the STP version.

ExamplesRuijie(config)# spanning-tree mode stp

RelatedCommands

Platform

Command

Description

show spanning-tree

Displays the spanning-tree configuration.

N/A

Description

7.30 spanning-tree mst configuration
Use this command to enter the MST configuration mode in the global configuration mode andconfigure the MSTP region. Use the no form of the command to restore the default setting.
spanning-tree mst configurationno spanning-tree mst configuration

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

Command

Global configuration mode.

Mode

Usage Guide

To return to the privileged EXEC mode, enter end or Ctrl+C.
To return to the global configuration mode, enter exit.

7-25

Command Reference

MSTP Commands(beta)

After entering the MST configuration mode, you can configure MSTP Region parameters:

instance instance-id vlan vlan-range: Adds the VLANs to the MST instance.

name name: Specifies the MST name, a string of up to 32 characters.

revision version: Sets the MST versions in the range 0 to 65535.

Run the show spanning-tree mst configuration command to display the information of the MST
region.

Configuration

This example enters the MST configuration mode.

ExamplesRuijie(config)# spanning-tree mst configuration
Ruijie(config-mst)# instance 1 vlan 3, 5-10
Ruijie(config-mst)# name region1
Ruijie(config-mst)# revision1
Ruijie(config-mst)# show spanning-tree mst configuration
Multi spanning tree protocol : EnableName: region1

Revision : 1Instance----------

Vlans Mapped---------------------

0

1-2,4,11-4094

1

3,5-10----------------------------------Ruijie(config-mst)# exit
Ruijie(config)#

RelatedCommands

Platform

Command

Description

show spanning-tree mst configuration

Displays the MST region configuration.

instance

Adds VLANs to the MST instance.

nameConfigures the name of MST.

revision

Configures the version of MST.

N/A

Description

7.31 spanning-tree pathcost method
Use this command to configure the path cost of the port. Use the no form of this command to restore
the default setting.
spanning-tree pathcost method { long | long standard | short }no spanning-tree pathcost method

Parameter
Description

Parameter

Description

7-26

Command Reference

MSTP Commands(beta)

Adopts the 802.1t standard (long) to configure path cost.
The cost of a port path ranges from 1 to 200000000.

longAggregate Port Cost = Physical Port Cost * 95%.
Adopts the 802.1t standard (long standard) to configure path cost.
long standard

The cost of the port path ranges from 1 to 200000000.
Aggregate Port Cost = Physical Port Cost / Linkupcnt.
Adopts the 802.1d standard to configure path cost.

short

The cost of a port path ranges from 1 to 65535.
Aggregate Port Cost = Physical Port Cost * 95%

Defaults

802.1T standard (long) is adopted to set path cost by default.

Command

Global configuration mode.

Mode

Usage Guide

When the path cost method of the port is long standard, the cost of the aggregate port changes as
the number of member ports changes, which changes the network topology.


If an aggregate port is static, the value of Linkupcnt in the table is the number of active member
ports.



If an aggregate port is an LACP AP, the value of Linkupcnt in the table is the number of member
ports forwarding AP data.

If no member port in the aggregate port goes up, the value of Linkupcnt is 1.

Configuration

The following example configures the path cost of the port.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree pathcost method long

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the STP configuration of the interface.

N/A

Description

7.32 spanning-tree portfast
Use this command to enable the portfast on the interface. Use the disabled form of this command torestore the default setting,spanning-tree portfast [ disabled ]Parameter
Description

Parameter

Description

disabled

Disables the portfast on the interface.

7-27

Command Reference

MSTP Commands(beta)

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

After PortFast is enabled on a port, the port directly enters the forwarding state. However, since thePort Fast Operational State becomes disabled due to receipt of BPDUs, the port can properly run the
STP algorithm and enter the forwarding state.

Configuration

The following example enables the portfast on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree portfast

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the STP configuration of the interface.

N/A

Description

7.33 spanning-tree portfast bpdufilter default
Use this command to enable the BPDU filter function globally. You can use the no form of thecommand to restore the default setting.
spanning-tree portfast bpdufilter default
no spanning-tree portfast bpdufilter default

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default,

Command

Global configuration mode.

Mode

Usage Guide

Once the BPDU filter is enabled, the BPDU message is neither received nor sent on the Port Fastinterface. Use the show spanning-tree command to display the configuration.

Configuration

The following example enables the BPDU filter function globally.

ExamplesRuijie(config)# spanning-tree portfast bpdufilter default

7-28

Command Reference

RelatedCommands

Platform

MSTP Commands(beta)

Command

Description

show spanning-tree interface

Displays the global STP configuration.

N/A

Description

7.34 spanning-tree portfast bpduguard default
Use this command to enable the BPDU guard globally. Use the no form of this command to restore
the default setting,spanning-tree portfast bpduguard default
no spanning-tree portfast bpduguard default

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

Once the BPDU guard is enabled on the interface, it will enter the error-disabled status if the BPDU
message arrives at the interface. Use the show spanning-tree command to display theconfiguration.
The global BPDU guard takes effect only when PortFast is enabled on a port.

Configuration

The following example enables the GPDU guard globally.

ExamplesRuijie(config)# spanning-tree portfast bpduguard default

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the global STP configuration.

N/A

Description

7.35 spanning-tree portfast default
Use this command to enable the portfast feature on all interfaces globally. Use the no form of thiscommand to restore the default setting.
spanning-tree portfast default

7-29

Command Reference

MSTP Commands(beta)

no spanning-tree portfast default

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example enables the portfast feature on all interfaces globally.

ExamplesRuijie(config)# spanning-tree portfast default

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the global STP configuration.

N/A

Description

7.36 spanning-tree port-priority
Use this command to configure the interface priority for different instances in the interface
configuration mode. It will determine which interface of a loop in a region is in charge of forwarding.
Use the no form of this command to restore the default setting.
spanning-tree [ mst instance-id ] port-priority priority
no spanning-tree [ mst instance-id ] port-priority

Parameter
Description

Parameter

Description

mst instance-id

Instance ID, in the range of 0 to 64. The default instance ID is 0.

port-priority priority

Interface priority. Sixteen integers are available: 0, 16, 32, 48, 64, 80, 96,112, 128, 144, 160, 176, 192, 208, 224, 240, which are the multiples of 16.

Defaults

The default port priority is 128.

Command

Interface configuration mode.

Mode

Usage Guide

When a loop occurs in the region, the interface of the higher priority will be in charge of forwarding. If

7-30

Command Reference

MSTP Commands(beta)

all interfaces have the same priority value, the interface of the smaller number will be in charge of theforwarding.
Run this command to determine which port in the loop of a region enters the forwarding state.

Configuration

This example sets the priority of gigabitethernet 0/17 to 0 in instance 20.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree mst 20 port-priority 0

RelatedCommands

Platform

Command

Description

show spanning-tree interface

Displays the global STP configuration.

N/A

Description

7.37 spanning-tree priority
Use this command to set the device priority for different instances in the global configuration mode.
Use the no form of this command to restore the default setting.
spanning-tree [ mst instance-id ] priority priority
no spanning-tree [ mst instance-id ] priority

Parameter
Description

Parameter

Description

mst instance-id

Instance ID, in the range of 0 to 64. The default instance ID is 0.
Device priority. Sixteen integers are available: 0, 4096, 8192, 12288, 16384,

priority priority

20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344 and61440, which are all multiples of 4096.

Defaults

The default device priority is 32768.

Command

Global configuration mode.

Mode

Usage Guide

Configure the switch priority to determine a device as the root of the entire network and to determine
the topology of the entire network.

Configuration

The following example sets the device priority of the Instance to 8192.

ExamplesRuijie(config)# spanning-tree mst 20 priority 8192
You can verify your settings by entering the show spanning-tree mst summary command in theprivileged EXEC mode.

RelatedCommand

Description

7-31

Command Reference

MSTP Commands(beta)

Commands
Displays the global STP configuration.

show spanning-tree

Platform

N/A

Description

7.38 spanning-tree reset
Use this command to restore the spanning-tree configuration to the default setting.
spanning-tree reset

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode.

Mode

Usage Guide

The function do not have a no command.

Configuration

The following example resets STP.

ExamplesRuijie(config)# spanning-tree reset

RelatedCommands

Platform

Command

Description

show spanning-tree

Displays the global STP configuration.

show spanning-tree interface

Displays the STP configuration of the interface.

N/A

Description

7.39 spanning-tree tc-guard
Use this command to enable tc-guard on the interface to prevent the spread of TC messages. Use
the no form of this command to disable this function on the interface.
spanning-tree tc-guard
no spanning-tree tc-guard

Parameter
Description

Parameter

Description

N/A

N/A

7-32

Command Reference

MSTP Commands(beta)

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

Enable TC guard to prevent TC packets from spreading

Configuration

The following example enables tc-guard on the interface to prevent the spread of TC messages.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# spanning-tree tc-guard

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.40 spanning-tree tc-protection
Use this command to enable tc-protection globally. Use The no form of this command to disable thisfunction.
spanning-tree tc-protection
no spanning-tree tc-protection

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example enables tc-protection globally.

ExamplesRuijie(config)# spanning-tree tc-protection

RelatedCommands

Command

Description

N/A

N/A

7-33

Command Reference

Platform

MSTP Commands(beta)

N/A

Description

7.41 spanning-tree tc-protection tc-guard
Use this command to enable tc-guard to prevent TC packets from being flooded. Use the no form of
this command to restore the default setting.
spanning-tree tc-protection tc-guard
no spanning-tree tc-protection tc-guard

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

Enable TC guard to prevent TC packets from spreading.

Configuration

The following example enables tc-guard to prevent TC packets from being flooded.

ExamplesRuijie(config)# spanning-tree tc-protection tc-guard

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7-34

Command Reference

GVRP Commands(beta)

8 GVRP Commands(beta)
8.1 bridge-frame forwarding protocol gvrp
Use this command to enable GVRP PDUs transparent transmission. Use the no form of thiscommand to restore the default setting.
bridge-frame forwarding protocol gvrp
no bridge-frame forwarding protocol gvrp

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

mode

Usage Guide

In the IEEE 802.1Q standard, the MAC address 01-80-C2-00-00-21 of GVRP PDUs is reserved for
future standardization. In other words, the device following the IEEE 802.1Q standard does not
forward GVRP PDUs frames. However, in actual network deployment, GVRP PDUs transparent
transmission may be required. For example, the device not enabled with GVRP needs to transmit
GVRP PDUs frames transparently to ensure proper GVRP topology calculation.

Configuration

The following example enables GVRP PDUs transparent transmission.

ExamplesRuijie(config)# bridge-frame forwarding protocol gvrp

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8.2 clear gvrp statistic
Use this command to clear the GVRP statistics for re-counting.
clear gvrp statistics { interface-type interface-number | all }Parameter
Description

Parameter

Description

8-1

Command Reference

GVRP Commands(beta)

interface-type interface-number

Defaults

N/A

CommandPrivileged EXEC mode.

Interface ID

mode

Usage Guide

Use the show gvrp statistics to display the statistics.

Configuration

The following example clears GVRP statistics.

ExamplesRuijie# clear gvrp statistics all

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8.3 gvrp applicant state
Use this command configures the GVRP advertisement mode on the interface. Use the no form of
this command to restore default setting.
gvrp applicant state { normal | non-applicant }no gvrp applicant stateParameter
Description

Parameter

Description

normalThe interface sends VLAN advertisement.

non-applicant

The interface does not send VLAN advertisement.

Defaults

The interface sends GVRP advertisement by default.

Command

Interface configuration mode.

mode

Usage Guide

N/A

Configuration

The following example configures the GVRP advertisement mode on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# gvrp applicant state normal

RelatedCommand

Description

8-2

Command Reference

GVRP Commands(beta)

Commands
Displays the GVRP configurations.

show gvrp configuration

Platform

N/A

Description

8.4 gvrp dynamic-vlan-creation enable
Use this command to enable dynamic VLAN creation. Use the no form of this command to restore thedefault setting.
gvrp dynamic-vlan-creation enable
no gvrp dynamic-vlan-creation enable

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode.

mode

Usage Guide

Use the show gvrp configuration to display the configuration.

Configuration

The following example enables dynamic VLAN creation.

ExamplesRuijie(config)# gvrp dynamic-vlan-creation enable

RelatedCommands

Platform

Command

Description

show gvrp configuration

Displays the GVRP configurations.

N/A

Description

8.5 gvrp enable
Use this command to enable the GVRP function. Use the no form of this command to restore thedefault setting.
gvrp enable
no gvrp enable

Parameter
Description

Parameter

Description

8-3

Command Reference

N/A

GVRP Commands(beta)

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

mode

Usage Guide

This command is used to display the configuration.

Configuration

The following example enables the GVRP function.

ExamplesRuijie(config)#gvrp enable

RelatedCommands

Platform

Command

Description

show gvrp configuration

Displays the GVRP configurations.

N/A

Description

8.6 gvrp registration modeUse this command to set the registration mode to control whether to enable dynamic VLAN
creation/registration/canceling on the port. Use the no form of this command to restore the default
setting.
gvrp registration mode { normal | disabled }no gvrp registration mode

Parameter
Description

Parameter

Description

normalEnables dynamic VLAN creation/registration/canceling on the port.

disabled

Disables dynamic VLAN creation/registration/canceling on the port.

Defaults

Dynamic VLAN creation/registration/canceling is enabled by default,

Command

Interface configuration mode.

mode

Usage Guide

N/A

Configuration

The following example sets the registration mode.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# gvrp registration mode normal

8-4

Command Reference

RelatedCommands

Platform

GVRP Commands(beta)

Command

Description

show gvrp configuration

Displays the GVRP configurations.

N/A

Description

8.7 gvrp timer
Use this command to set the GVRP timer. Use the no form of this command to restore the default
setting.
gvrp timer { join hold | leave leave | leaveall leaveall }no gvrp timer

Parameter
Description

Parameter

Description

join holdControls the maximum delay before sending the advertisement on the port. The
actual sending interval is in the range of 0 to the maximum delay hold. The
value ranges from 1 to 200 in the unit of milliseconds.

leave leave

Controls the waiting time before removing the VLAN from the port with the
Leave Message received. If the Join Message is received again within this time
range, the port-VLAN relation still exists and the timer becomes invalid. If no
Join Message is received on the port, the port status will be the Empty andremoved from the VLAN member list. The value ranges from 600 to 9999 in theunit of milliseconds.

leave all leaveall

Controls the minimum interval of sending the LeaveAll Message on the port. If
the LeaveAll Message is received before the timer expires, the timer re-counts.
If the timer expires, send the LeaveAll Message on the port and also send thisMessage to the port, so that the Leave timer begins counting. The actual
sending interval ranges from leaveall to leaveall+join. The value ranges from
601 to 2147483647 in the unit of milliseconds.

Defaults

By default, Join timer is 200 milliseconds, Leave timer is 600 milliseconds, and Leaveall timer is
10000 milliseconds.

Command

Global configuration mode

mode

Usage Guide

Use the show gvrp configuration to display the configuration.
Use the no gvrp timer command to restore join, leave and leaveall timer to default settings.

Configuration

The following example configures the join timer.

ExamplesRuijie(config)# gvrp timer join 200

8-5

Command Reference

RelatedCommands

Platform

GVRP Commands(beta)

Command

Description

show gvrp configuration

Displays the GVRP configuration.

N/A

Description

8.8 l2protocol-tunnel gvrp
Use this command to enable global GVRP PDUs TUNNEL globally. Use the no form of this command
to restore the default setting.
l2protocol-tunnel gvrp
no l2protocol-tunnel gvrp

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

mode

Usage Guide

If you want to enable global GVRP PDUs TUNNEL, enable GVRP PDUs TUNNEL on the interface
first.

Configuration

The following example enables GVRP PDUs TUNNEL globally.

ExamplesRuijie(config)# l2protocol-tunnel gvrp
Ruijie(config)# show l2protocol-tunnel gvrp
L2protocol-tunnel: Gvrp Disable
L2protocol-tunnel destination mac address:01d0.f800.0006

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8-6

Command Reference

GVRP Commands(beta)

8.9 l2protocol-tunnel gvrp enable
Use this command to enable GVRP PDUs TUNNEL on the interface. Use this command to restore
the default setting.
l2protocol-tunnel gvrp enable
no l2protocol-tunnel gvrp enable

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode

mode

Usage Guide

If you want to enable global GVRP PDUs TUNNEL, enable GVRP PDUs TUNNEL on the interface
first.

Configuration

The following example enables GVRP PDUs TUNNEL on the interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# l2protocol-tunnel gvrp enable
Ruijie(config-if-GigabitEthernet 0/17)# show l2protocol-tunnel gvrp
L2protocol-tunnel: Gvrp Disable
L2protocol-tunnel destination mac address:01d0.f800.0006
GigabitEthernet 0/17 l2protocol-tunnel gvrp enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8.10 l2protocol-tunnel gvrp tunnel-dmac
Use this command to configure the MAC address for transparent transmission in GVRP PDUs
TUNNEL. Use the no form of this command to restore the default setting.
l2protocol-tunnel gvrp tunnel-dmac mac-address
no l2protocol-tunnel gvrp tunnel-dmac

Parameter

Parameter

Description

8-7

Command Reference

GVRP Commands(beta)

Description
mac-address

The MAC address for transparent transmission in GVRP PDUs
TUNNEL. The available GVRP PDUs TUNNEL addresses include
01d0.f800.0006 and 011a.a900.0006.

Defaults

The default is 01d0.f800.0006.

Command

Global configuration mode

mode

Usage Guide

N/A

Configuration

The following example configures the MAC address for transparent transmission in GVRP PDUs

Examples

TUNNEL.
Ruijie(config)# l2protocol-tunnel gvrp tunnel-dmac 011a.a900.0006

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8.11 show gvrp configuration
Use this command to display the GVRP configuration.
show gvrp configuration

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

mode

Usage Guide

Use the show gvrp configuration to display the configuration.

Configuration

The following example displays GVRP configuration.

ExamplesGlobal GVRP Configuration:
GVRP Feature:enabled
GVRP dynamic VLAN creation:enabled

8-8Command Reference

GVRP Commands(beta)

Join Timers(ms):200
Leave Timers(ms):600
Leaveall Timers(ms):1000
Port based GVRP Configuration:
PORT-----------------------

Applicant Status

Registration Mode-----------------------------------------

normalnormalGigabitEthernet 0/17

RelatedCommands

Platform

Field

Description

GVRP Feature

Whether to enable GVRPGVRP dynamic VLAN creation

Whether to enable dynamic VLAN creation

Join Timers

Join timer

Leave Timers

Leave timer

Leaveall Timers

Leaveall timer

PORT

Port

Applicant Status

Advertisement mode

Registration Mode

Registration mode

Command

Description

N/A

N/A

N/A

Description

8.12 show gvrp statistics
Use this command to display the GVRP statistics of one interface or all interfaces.
show gvrp statistics { interface-type interface-number | all }Parameter
Description

Parameter

Description

interface-type interface-number

Interface ID. Display the statistics of one interface.

all

Display the statistics of all interfaces.

Defaults

N/A

CommandPrivileged EXEC mode

mode

Usage Guide

N/A

Configuration

Ruijie# show gvrp statistics gigabitethernet 0/17

8-9

Command Reference

ExamplesInterface

GVRP Commands(beta)
GigabitEthernet 0/17

RecValidGvrpPdu

0

RecInvalidGvrpPdu

0

RecJoinEmpty0

RecJoinIn

0

RecEmpty

0

RecLeaveEmpty0

RecLeaveIn

0

RecLeaveAll

0

SentGvrpPdu

0

SentJoinEmpty

0

SentJoinIn

0

SentEmpty

0

SentLeaveEmpty

0

SentLeaveIn

0

SentLeaveAll

0

JoinIndicated0

LeaveIndicated0

JoinPropagated0

LeavePropagated 0

Field

Description

RecValidGvrpPdu

Number of received valid GPDU packets.

RecInvalidGvrpPdu

Number of received unvalid GPDU packets.

RecJoinEmpty/ SentJoinEmpty

Number of received/sent JoinEmpty messages.

RecJoinIn/ SentJoinIn

Number of received/sent JoinIn messages.

RecEmpty/SentEmpty

Number of received/sent Empty messages.

RecLeaveEmpty/SentLeaveEmpty

Number of received/sent LeaveEmpty
messages,

RecLeaveIn/ SentLeaveIn

Number of received/sent LeaveIn messages.

RecLeaveAll/SentLeaveAll

Number of received/sent LeaveAll messages.

SentGvrpPdu

Number of sent GPDU messages.

JoinIndicated/ LeaveIndicatedNumber of Join/Leave service requests.

JoinPropagated / LeavePropagatedNumber of Join/Leave topology update
requests.

RelatedCommands

Command

Description

clear gvrp statistics

Clears the statistics of one interface or all
interfaces.

Platform

N/A

Description

8-10

Command Reference

GVRP Commands(beta)

8.13 show gvrp status
Use this command to display all dynamic VLAN ports generated by GVRP and the dynamic VLAN
ports added to the static VLAN.
show gvrp status

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

mode

Usage Guide

Use the show gvrp status command to display the GVRP status.

Configuration

The following example displays the GVRP status.

ExamplesRuijie# show gvrp status
VLAN 1
Dynamic Ports:
DVLAN 2
Dynamic Ports:

RelatedCommands

Platform

Field

Description

VLAN

Static VLAN

DVLAN

Dynamic VLAN

Dynamic Ports

Dynamic ports.

Command

Description

N/A

N/A

N/A

Description

8.14 show l2protocol-tunnel gvrp
Use this command to display GVRP PDUs TUNNEL configuration.
show l2protocol-tunnel gvrp

Parameter
Description

Parameter

Description

8-11

Command Reference

N/A

GVRP Commands(beta)

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

mode

Usage Guide

N/A

Configuration

The following example displays GVRP PDUs TUNNEL configuration.

ExamplesRuijie# show l2protocol-tunnel gvrp
L2protocol-tunnel: Gvrp Enable
L2protocol-tunnel destination mac address:011a.a900.0006
GigabitEthernet 0/17 l2protocol-tunnel gvrp enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8-12

Command Reference

LLDP Commands(beta)

9 LLDP Commands(beta)
9.1 civic-location
Use this command to configure a common LLDP address. Use the no form of this command to delete
the address.

{ country | state | county | city | division | neighborhood | street-group | leading-street-dir |trailing-street-suffix | street-suffix | number | street-number-suffix | landmark |additional-location-information | name | postal-code | building | unit | floor | room |type-of-place | postal-community-name | post-office-box | additional-code } ca-word

no { country | state | county | city | division | neighborhood | street-group | leading-street-dir |trailing-street-suffix | street-suffix | number | street-number-suffix | landmark |additional-location-information | name | postal-code | building | unit | floor | room |type-of-place | postal-community-name | post-office-box | additional-code } ca-word

Parameter
Description

Parametercountry

Description
Country code, two bytes. For example, the country code of
China is CH.

state

Address information, CA type 1

countyCA type 2city

CA type 3

division

CA type 4neighborhood

CA type 5

street-group

CA type 6

leading-street-dir

CA type 16

trailing-street-suffix

CA type 17

street-suffix

CA type 18

number

CA type 19

street-number-suffix

CA type 20

landmark

CA type 21

additional-location-information

CA type 22

nameCA type 23

postal-code

CA type 24

building

CA type 25

unit

CA type 26

floor

CA type 27

room

CA type 28

type-of-place

CA type 29

postal-community-nameCA type 30

9-1

Command Reference

LLDP Commands(beta)

post-office-box

CA type 31

additional-code

CA type 32

ca-wordAddress information

Defaults

The common address of a device is not configured by default.

Command

LLDP Civic address configuration mode

Mode

Usage Guide

This command is used to configure a common LLDP address in LLDP Civic address configuration
mode.
The show lldp location civic-location { identifier id | interface interface-type interface-number |static } command can be used to display the information about an LLDP Civic address.

Configuration

The following example configures an LLDP Civic Address (ID: 1).

ExamplesRuijie#config
Ruijie(config)# lldp location civic-location identifier 1
Ruijie(config-lldp-civic)# country CH
Ruijie(config-lldp-civic)# city Fuzhou

RelatedCommand

Description

Commands

show lldp location

Displays the information about an LLDP Civic address.

Platform

N/A

Description

9.2 clear lldp statistics
Use this command to clear LLDP statistics.
clear lldp statistics [ interface interface-type interface-number ]Parameter

Parameter

Description

Description

interface interface-type interface-number

Clear the LLDP statistics of the specified interface

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example clears LLDP statistics of interface 1.

ExamplesRuijie# clear lldp statistics interface GigabitEthernet 0/17

9-2

Command Reference

LLDP Commands(beta)

Ruijie# show lldp statistics interface GigabitEthernet 0/17
Lldp statistics information of port [GigabitEthernet 0/17]-----------------------------------------------------------The number of lldp frames transmitted
The number of frames discarded
The number of error frames

: 0
: 0

The number of lldp frames received
The number of TLVs discarded

: 0

: 0

: 0

The number of TLVs unrecognized: 0

The number of neighbor information aged out : 0

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.3 clear lldp table
Use this command to clear LLDP neighbor information.
clear lldp table [ interface interface-type interface-number ]Parameter

Parameter

Description

Description

interface interface-type interface-number

Clears the LLDP neighbor information of thespecified interface.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

If the interface parameter is specified, the LLDP neighbor information on the specified interface iscleared.
If the interface parameter is not specified, the LLDP neighbor information on all interfaces is cleared.

Configuration

The following example clears the LLDP neighbor information on interface 17.

ExamplesRuijie# show lldp neighbors interface GigabitEthernet 0/17
Lldp statistics information of port [GigabitEthernet 0/17]-----------------------------------------------------------The number of lldp frames transmitted
The number of frames discarded
The number of error frames

: 0
: 0

The number of lldp frames received
The number of TLVs discarded

: 0

: 0

: 0

9-3

Command Reference
The number of TLVs unrecognized

LLDP Commands(beta): 0

The number of neighbor information aged out : 0
Ruijie# clear lldp table interface GigabitEthernet 0/17
Ruijie# show lldp neighbors interface GigabitEthernet 0/17

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.4 device-type
Use this command to configure the device type. Use the no form of this command to restore thedefault setting.
device-type device-type
no device-type

Parameter

Parameter

Description

Description
Device type. The value ranges from 0 to 2.

device-type

0: The device type is DHCP Server.
1: The device type is switch.
2: The device type is LLDP MED terminal.

Defaults

The device type is not configured by default.

Command

LLDP Civic address configuration mode

Mode

Usage Guide

This command is used to configure the device type in a common LLDP address in LLDP Civic
address configuration mode.
The show lldp location civic-location { identifier id | interface interface-type interface-number |static } command can be used to display the information about an LLDP Civic address.

Configuration

The following example sets the device type to switch.

ExamplesRuijie#config
Ruijie(config)# lldp location civic-location identifier 1
Ruijie(config-lldp-civic)# device-type 1

RelatedCommands

Command

Description
Displays the information about an LLDP Civic

show lldp location

address.

9-4

Command Reference

Platform

LLDP Commands(beta)

N/A

Description

9.5 lldp enable
Use this command to enable the LLDP globally or on the interface. Use no form of this command todisable this function.
lldp enable
no lldp enable

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Global configuration mode

Mode

Interface configuration mode

Usage Guide

LLDP takes effect on an interface only when LLDP is enabled globally.
The feature is not supported by G.hn ports.

Configuration

The following example disables LLDP globally and on the interface.

ExamplesRuijie#config
Ruijie(config)#no lldp enable
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# no lldp enable

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.6 lldp encapsulation snap
Use this command to configure the encapsulation format of LLDP packets. Use the no form of thiscommand to restore the default setting.
lldp encapsulation snap
no lldp encapsulation snap

Parameter

Parameter

Description

Description

N/A

N/A

9-5

Command Reference

LLDP Commands(beta)

Defaults

By default, Ethernet II encapsulation format is used.

Command

Interface configuration mode.

Mode

Usage Guide

To guarantee the normal communication between local device and neighbor device, the same
LLDP packet encapsulation format must be used.
The feature is not supported by G.hn ports.

Configuration

The following example sets LLDP packet encapsulation format to SNAP.

ExamplesRuijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp encapsulation snap

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.7 lldp error-detect
Use this command to configure the LLDP error detection, including the detection of VLAN
configurations on both sides of the link, port state detection, port aggregation configuration detection,
MTU configuration detection and loop detection. If any error is detected by LLDP, warning message
will be printed to notify the administrator. Use the no form of this command to disable this function.
lldp error-detect
no lldp error-detect

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

LLDP error detection relies on the specific TLV in the LLDP packets exchanged between devices onboth sides of the link. To ensure normal functioning of the detection feature, correct TLVs must be
advertised.
The feature is not supported by G.hn ports.

9-6

Command Reference

LLDP Commands(beta)

Configuration

The following example configures LLDP error detection.

ExamplesRuijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp error-detect

RelatedCommand

Description

Commands

show interface status

Displays LLDP status information.

Platform

N/A

Description

9.8 lldp fast-countWhen a new neighbor is detected or when LLDP operating mode changes from shutdown or Rx to
TxRx or Tx, to allow the neighbor device to quickly study the information about this device, the fastsending mechanism will be initiated. The fast sending mechanism shortens the LLDPDU sending
interval to 1 second and continuously transmits a certain number of LLDPDUs before restoring to thenormal transmit interval. Use the no form of this command to restore the default setting.
lldp fast-count fast-count-value
no lldp fast-countParameter

Parameter

Description

Description

fast-count-value

The number of fast sent LLDP packets, in the range from 1 to 10.

Defaults

The default is 3.

Command

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example sets the number of fast sent LLDP packets to 5.

ExamplesRuijie# config
Ruijie(config)# lldp fast-count 5

RelatedCommand

Description

Commands

show interface status

Displays LLDP status information.

9-7

Command Reference

Platform

LLDP Commands(beta)

N/A

Description

9.9 lldp hold-multiplierUse this command to set the TTL multiplier. Use the no form of this command to restore to default
setting.
lldp hold-multiplier ttl-value
no lldp hold-multiplierParameter

Parameter

Description

Description

ttl-value

TTL multiplier, in the range from 2 to 10.

Defaults

The default is 4.

Command

Global configuration mode.

Mode

Usage Guide

The value of Time To Live (TLV) in LLDP packet = TTL multiplier × LLDP packet transmit interval + 1.
Therefore, the TTL of local device information on the neighbor device can be controlled by adjusting
TTL multiplier.

Configuration

The following example sets TTL multiplier to 5.

ExamplesRuijie#config
Ruijie(config)#lldp hold-multiplier 5

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.10 lldp location civic-location identifier
Use this command to create a common address of a device connected to the network in LLDP Civic
Address configuration mode. Use the no form of this command to delete the address.
lldp location civic-location identifier id
no lldp location civic-location identifier id

Parameter

Parameter

Description

Descriptionid

ID of a common address of a network device, in the range from 1 to 1024.

Defaults

The common address of a device is not configured by default.

9-8Command Reference

Command

LLDP Commands(beta)

Global configuration mode

Mode

Usage Guide

This command can be used to enter the LLDP Civic Address configuration mode.
The show lldp location civic-location { identifier id | interface interface-type interface-number |static } command can be used to display the information about an LLDP Civic address.

Configuration

The following example creates the Civic Address information in LLDP MED-TLV as follows: set id to

Examples1.
Ruijie#config
Ruijie(config)#lldp location civic-location identifier 1
Ruijie(config-lldp-civic)#

RelatedCommand

Description

Commands

show lldp location

Displays the LLDP Civic Address information.

Platform

N/A

Description

9.11 lldp location elin identifier
Use this command to set an emergency number encapsulated in a Location Identification TLV. Use
the no form of this command to delete the number.
lldp location elin identifier id elin-location tel-number
no lldp location elin identifier id

Parameter

Parameter

Description

Descriptionid

ID of an emergency number, in the range from 1 to 1024.

tel-number

Emergency number, in the range from 10 to 25 bytes.

Defaults

The emergency telephone number of a device is not configured by default.
The show lldp location elin-location { identifier id | interface interface-type interface-number |static } command can be used to display the LLDP emergency number.

Command

Global configuration mode

Mode

Usage Guide

This command is used to configure an emergency number.

Configuration

The following example sets an emergency number.

ExamplesRuijie#config
Ruijie(config)#lldp location elin identifier 1 elin-location 085283671111

9-9

Command Reference

LLDP Commands(beta)

RelatedCommand

Description

Commands

show lldp location elin-location { identifier
id | interface interface-type interface-number |Displays an LLDP emergency number.

static }Platform

N/A

Description

9.12 lldp management-address-tlv
Use this command to configure the management address advertised in LLDP packets. Use the noform of this command to disable the advertisement of management address.
lldp management-address-tlv [ ip-address ]no lldp management-address-tlv

Parameter

Parameter

Description

Description

ip-address

The management address advertised in LLDP packets.

Defaults

By default, the management address is advertised in LLDP packets, and is the IPv4 address of thelowest-ID VLAN carried on the port. If IPv4 address is not configured for this VLAN, the next lowest-ID
VLAN carried on the port will be tried until the IPv4 address is obtained.
If the IPv4 address is still not found, the IPv6 address of the lowest-ID VLAN carried on the port will be
tried.
If the IPv6 address is still not found, the MAC address of the device will be advertised as the
management address.

Command

Interface configuration mode.

Mode

Usage Guide

In global configuration mode, the command lldp management-address-tlv ip-address can be used
to configure the management address advertised in LLDP packets.
The feature is not supported by G.hn ports.

Configuration

The following example configures the management address advertised in LLDP packets to

Examples

192.168.1.1.
Ruijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp management-address-tlv 192.168.1.1

RelatedCommand

Description

Commands

show lldp local-information

Displays LLDP local information

9-10

Command Reference

Platform

LLDP Commands(beta)

N/A

Description

9.13 lldp modeUse this command to configure the LLDP operating mode. Use no form of this command to restore
the default setting.
lldp mode { rx | tx | txrx }no lldp mode

Parameter

Parameter

Description

Description

rx

Only sends LLDPDUs.

tx

Only receives LLDPDUs.

txrx

Sends and receives LLDPDUs.

Defaults

The default is txrx.

Command

Interface configuration mode

Mode

Usage Guide

Disable LLDP operating mode on the interface. The interface won't send and receive LLDP packets.
The precondition for enabling LLDP on the interface is that LLDP has been enabled globally and
LLDP operates in tx, rx or txrx mode.
The feature is not supported by G.hn ports.

Configuration

The following example sets LLDP operating mode to tx on the interface.

ExamplesRuijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp mode tx

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information

Platform

N/A

Description

9.14 lldp network-policy profile
Use this command to create an LLDP network policy and enter the LLDP network policy configuration
mode. Use the no form of this command to delete the policy.
lldp network-policy profile profile-num
no lldp network-policy profile profile-num

9-11

Command Reference

LLDP Commands(beta)

Parameter

Parameter

Description

Description

profile-num

ID of an LLDP network policy, in the range from 1 to 1024.

Defaults

There is no LLDP network policy by default.

Command

Global configuration mode

Mode

Usage Guide

This command is used to enter the LLDP network policy configuration mode. When this command isrun, the policy ID must be specified.
In LLDP network-policy mode, the { voice | voice-signaling } vlan command can be used toconfigure the specific network policy.
The show lldp network-policy profile [ profile-num ] command can be used to display the LLDP
network policy.

Configuration

The following example creates an LLDP network policy whose ID is 1.

ExamplesRuijie#config
Ruijie(config)#lldp network-policy profile 1
Ruijie(config-lldp-network-policy)#

RelatedCommand

Description

Commands

show lldp network-policy profile

Displays an LLDP network policy.

Platform

N/A

Description

9.15 lldp notification remote-change enable
Use this command to configure LLDP Trap. Use the no form of this command to restore the default
setting.
lldp notification remote-change enable
no lldp notification remote-change enable

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode.

Mode

9-12

Command Reference

Usage Guide

LLDP Commands(beta)

By configuring LLDP Trap, the LLDP information of local device (such as information about thedetection of new neighbor or the fault on the communication link) can be sent to the network
management server. The administrator can monitor the network operation status according to suchinformation.
The feature is not supported by G.hn ports.

Configuration

The following example configures LLDP Trap.

ExamplesRuijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp notification remote-change enable

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.16 lldp timer notification-interval
Use this command to set an interval of sending LLDP Traps. Use the no form of this command torestore the default setting.
lldp timer notification-interval trap
no lldp timer notification-intervalParameter
Description

Parameter
trap

Defaults

The default is 5.

Command

Global configuration mode.

Description
Interval of sending LLDP Traps, in the range from 5 to3600 in the unit of seconds.

Mode

Usage Guide

To prevent excessive LLDP traps from being sent, you can set an interval of sending LLDP Traps. If
LLDP information change is detected during this interval, traps will be sent to the network
management server.

Configuration

The following example sets the interval of sending LLDP Traps to 10 seconds.

ExamplesRuijie#config
Ruijie(config)#lldp timer notification-interval 10

9-13

Command Reference

LLDP Commands(beta)

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.17 lldp timer reinit-delay
Use this command to set port initialization delay. Use the no form of this command to restore hedefault setting.
lldp timer reinit-delay reinit-delay
no lldp timer reinit-delay

Parameter
Description

Parameter
reinit-delay

Defaults

The default is 2.

Command

Global configuration mode.

Description
Port initialization delay, in the range from 1 to 10 in the unit ofseconds.

Mode

Usage Guide

To prevent LLDP from being initialized too frequently due to the frequent operating mode change, you
can configure port initialization delay.

Configuration

The following example sets LLDP port initialization delay to 3 seconds.

ExamplesRuijie#config
Ruijie(config)#lldp timer reinit-delay 3

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.18 lldp timer tx-delay
Use this command to set LLDP packet transmission delay. Use the no form of this command torestore the default setting.
lldp timer tx-delay tx-delay
no lldp timer tx-delay

9-14

Command Reference

Parameter
Description

LLDP Commands(beta)

Parameter

Description
LLDP packet transmission delay, in the range from 1 to 8192

tx-delay

Defaults

The default is 2.

Command

Global configuration mode.

in the unit of seconds.

Mode

Usage Guide

An LLDP-enabled port will send LLDP packets when the local device information changes. To avoid
frequently sending LLDP packets due to the frequent local device information change, configure the
LLDP packet transmission delay to control the frequent transmission of LLDP packets.

Configuration

The following example sets LLDPDU transmission delay to 3 seconds.

ExamplesRuijie#config
Ruijie(config)#lldp timer tx-delay 3

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.19 lldp timer tx-interval
Use this command to set the interval of sending the LLDP packets. Use no form of this command torestore the default setting.
lldp timer tx-interval tx-interval
no lldp timer tx-intervalParameter
Description

Parametertx-interval

Defaults

The default is 30.

Command

Global configuration mode.

Description
Interval of sending the LLDP packets, in the range from 5 to 32768 in
the unit of seconds.

Mode

Usage Guide

N/A

Configuration

The following example sets the interval of sending the LLDP packets to 10 seconds.

9-15

Command Reference

LLDP Commands(beta)

ExamplesRuijie#config
Ruijie(config)#lldp timer tx-interval 10

RelatedCommand

Description

Commands

show lldp status

Displays LLDP status information.

Platform

N/A

Description

9.20 lldp tlv-enable basic-tlv
Use this command to configure the optional basic management TLVs to be advertised.
Use the no form of this command to remove the optional basic management TLVs to be advertised.
lldp tlv-enable basic-tlv { all | port-description | system-capability | system-description |system-name }no lldp tlv-enable basic-tlv { all | port-description | system-capability | system-description |system-name }Parameter

Parameter

Description

Descriptionall

All optional basic management TLVs

port-description

Port Description TLV

system-capability

System Capabilities TLV

system-description

System Description TLV

system-name

System Name TLVDefaults

All optional basic management TLVs are advertised on an interface by default.

Command

Interface configuration mode

Mode

Usage Guide

The mandatory basic management TLVs must be advertised in LLDPDU.
You do not need to run this command to configure the mandatory basic management TLVs to be
advertised.
You cannot run the no form of this command to remove the mandatory basic management TLVs tobe advertised.
The feature is not supported by G.hn ports.

Configuration

The following example configures all optional basic management TLVs to be advertised.

ExamplesRuijie# configure terminal
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp tlv-enable basic-tlv all

9-16

Command Reference

LLDP Commands(beta)

RelatedCommand

Description

Commands

show lldp tlv-config interface

Displays the attributes of advertisable TLVs.

Platform

N/A

Description

9.21 lldp tlv-enable dot1-tlv
Use this command to configure the IEEE 802.1 TLVs to be advertised.
Use the no form of this command to remove the IEEE 802.1 TLVs to be advertised.
lldp tlv-enable dot1-tlv { all | port-vlan-id | protocol-vlan-id [ vlan-id ] | vlan-name [ vlan-id ] }no lldp tlv-enable dot1-tlv { all | port-vlan-id | protocol-vlan-id | vlan-name }Parameter
Description

Parameterall

Description
The Port VLAN ID TLV, the Port and Protocol VLAN ID TLV, andthe VLAN Name TLV

port-vlan-id

Port VLAN ID TLVprotocol-vlan-id [ vlan-id ]Port and Protocol VLAN ID TLV

vlan-name [ vlan-id ]VLAN Name TLV. VLAN ID corresponding to the specified VLAN
name

Defaults

All IEEE 802.1 TLVs are advertised on an interface by default.

Command

Interface configuration mode

Mode

Usage Guide

The feature is not supported by G.hn ports.

Configuration

The following example configures all IEEE 802.1 TLVs to be advertised.

ExamplesRuijie# configure terminal
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp tlv-enable dot1-tlv all

RelatedCommand

Description

Commands

show lldp tlv-config interface

Displays the attributes of advertisable TLVs.

Platform

N/A

Description

9.22 lldp tlv-enable dot3-tlv
Use this command to configure the IEEE 802.3 TLVs to be advertised.
Use the no form of this command to remove the IEEE 802.3 TLVs to be advertised.

9-17

Command Reference

LLDP Commands(beta)

lldp tlv-enable dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power }no lldp tlv-enable dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power }Parameter

Parameter

Description

Description

all

All IEEE 802.3 TLVs

link-aggregation

Link Aggregation TLV

mac-physic

MAC/PHY Configuration/Status TLV

max-frame-size

Maximum Frame Size TLV

power

Power Via MDI TLVDefaults

All the IEEE 802.3 TLVs are not advertised on an interface by default.

Command

Interface configuration mode

Mode

Usage Guide

When configuring LLDP-MED Capability TLVs, configure LLDP 802.3 MAC/PHY TLVs first.
When removing LLDP 802.3 MAC/PHY TLVs, remove LLDP-MED Capability TLVs first.
The feature is not supported by G.hn ports.

Configuration

The following example configures all IEEE 802.3 TLVs to be advertised.

ExamplesRuijie# configure terminal
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp tlv-enable dot3-tlv all

RelatedCommand

Description

Commands

show lldp tlv-config interface

Displays the attributes of advertisable TLVs.

Platform

N/A

Description

9.23 lldp tlv-enable med-tlv
Use this command to configure the LLDP MED TLVs to be advertised.
Use the no form of this command to remove the LLDP MED TLVs to be advertised.
lldp tlv-enable med-tlv { all | capability | inventory | location civic-location identifier id | location
elin identifier id | network-policy profile [ profile-num ] | power-over-ethernet }no lldp tlv-enable med-tlv { all | capability | inventory | location civic-location identifier id |location elin identifier id | network-policy profile [ profile-num ] | power-over-ethernet }Parameter

Parameter

Description

Descriptionall

All LLDP-MED TLVs except Location Identification TLVs

capability

LLDP-MED Capabilities TLVinventory

Inventory management TLVs, including hardware revision

9-18

Command Reference

LLDP Commands(beta)

TLVs, firmware revision TLVs, software revision TLVs,
serial number TLVs, manufacturer name TLVs, model
name TLVs, and asset ID TLVs.
Common address information about the network device in
Location Identification TLVs. The policy ID ranges from 1

location civic-location identifier id

to 1024.
Emergency number in Location Identification TLVs. The

location elin identifier idpolicy ID ranges from 1 to 1024.

network-policy profile [ profile-num ]Network Policy TLV. The network policy ID ranges from 1
to 1024.
Extended Power-via-MDI TLV

power-over-ethernet

Defaults

All types of LLDP-MED TLVs are not advertised on an interface by default.

Command

Interface configuration mode

Mode

Usage Guide

When configuring LLDP-MED Capability TLVs, configure LLDP 802.3 MAC/PHY TLVs first.
When removing LLDP 802.3 MAC/PHY TLVs, remove LLDP-MED capability TLVs first.
When configuring LLDP-MED TLVs, configure LLDP-MED capability TLVs first so that LLDP-MED
TLVs of other types can be configured.
When removing LLDP-MED TLVs, remove LLDP-MED TLVs of other types first, so that LLDP-MED
capability TLVs can be removed.
If a device connects to an IP phone supporting LLDP-MED, the network policy TLV can be configured
to deliver policies to the IP phone.
The feature is not supported by G.hn ports.

Configuration

The following example applies LLDP network policy 1 on the 0/17 interface.

ExamplesRuijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp tlv-enable med-tlv network-policy profile 1

The following example applies the LLDP Civic Address (ID: 1) configuration on the 0/17 interface.
Ruijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)#lldp tlv-enable med-tlv location civic-location
identifier 1

The following example applies the emergency number (ID: 1) on the 0/17 interface.
Ruijie#config
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# lldp tlv-enable med-tlv location elin identifier 1

RelatedCommand

Description

9-19

Command Reference

Commands

show lldp tlv-config interface

Platform

N/A

LLDP Commands(beta)

Displays the attributes of advertisable TLVs

Description

9.24 show lldp local-information
Use this command to display the LLDP information of local device. The information will be
encapsulated in the TLVs and sent to the neighbor device.
show lldp local-information [ global | interface interface-type interface-number ]Parameter

Parameter

Description

Description

globalDisplay the global LLDP information to be sent.

interface interface-type interface-number

Defaults

N/A

CommandPrivileged EXEC mode

Displays the LLDP information to be sent out from thespecified interface.

Mode

Usage Guide

If no parameter is specified, all LLDP information is displayed, including global and interface-based
LLDP information.

Configuration

The following example displays the device information to be sent to neighbor device.

ExamplesRuijie#show lldp local-information
Global LLDP local-information:
Chassis ID type

: MAC address

Chassis ID: 00e0.4c00.215c

System name

: Ruijie

System description: Ruijie Full Gigabit Security Intelligence AccessSwitch(RG-HS2310-16GH2GT1XS) By Ruijie Networks
System capabilities supported: Repeater, Bridge, Router

System capabilities enabled: Repeater, Bridge, Router

LLDP-MED capabilities: LLDP-MED Capabilities, Network Policy, Location

Identification, Inventory
Device class: Network Connectivity

HardwareRev: 1.00FirmwareRev: HS2310_RGOS 11.4(1)B90, Release(10221711)

SoftwareRev: HS2310_RGOS 11.4(1)B90, Release(10221711)

SerialNum: MACC942570105

Manufacturer name

: RUIJIE

9-20

Command Reference
Asset tracking identifier

LLDP Commands(beta):

Description of fields in the command output is as follows:
Field

Description

Chassis ID type

Chassis ID type for identifying the Chassis ID field

Chassis ID
System name
System description

Used to identify the device, and is generally represented with
MAC address
Name of the sending device
Description of the sending device, including hardware/software
version, operating system and etc.

System capabilities supported

Capabilities supported by the system

System capabilities enabled

Capabilities currently enabled by the system

LLDP-MED capabilities

LLDP-MED capabilities supported by the system
MED device class, which is divided into 2 categories: network
connectivity device and terminal device.
Network connectivity device

Device classClass I: normal terminal device
Class II: media terminal device; besides Class I capabilities, italso supports media streams.
Class III: communication terminal device; it supports all thecapabilities of Class I and Class II and IP communication.

HardwareRev

Hardware version

FirmwareRev

Firmware version

SoftwareRev

Software version

SerialNum

Serial number

Manufacturer name

Device manufacturer

Asset tracking identifier

Asset tracking ID

Port ID typePort ID typePort ID

Port ID

Port description

Port description

Management address subtype

Management address typeManagement address

Management address

Interface numbering subtype

Type of the interface identified by the management address

Interface number

ID of the interface identified by the management address

Object identifier

ID of the object identified by the management address

Port VLAN ID

Port VLAN ID

Port and protocol VLAN ID

Port and Protocol VLAN ID

PPVID Supported

Indicates whether port and protocol VLAN is supported

PPVID Enabled

Indicates whether port and protocol VLAN is enabled

VLAN name of VLAN 1

Name of VLAN 1

Protocol Identity

Protocol identifier

Auto-negotiation supported

Indicates whether auto-negotiation is supported

Auto-negotiation enabled

Indicates whether auto-negotiation is enabled

9-21

Command Reference

PMD auto-negotiation
advertised

LLDP Commands(beta)

Auto-negotiation advertising capability of the port

Operational MAU type

Speed and duplex state of the port

PoE support

Indicates whether POE is supported

Link aggregation supported

Indicates whether link aggregation is supported

Link aggregation enabled

Indicates whether link aggregation is enabled

Aggregation port ID

ID of the link aggregation port

Maximum frame Size

Maximum frame size supported by the port
Device type, including:Power-via-MDI device type

PSE (power sourcing equipment)
PD (powered device)

Power-via-MDI power source

Power source type

Power-via-MDI power priority

Power supply priority

Power-via-MDI power value

Available power on port

Model nameName of model

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.25 show lldp location
Use this command to display the common LLDP address or emergency number of the local device.
show lldp location { civic-location | elin } { identifier id | interface interface-type interface-number| static }Parameter

Parameter

Description

Description

civic-location

Encapsulates a common address of a network device.

elin

Encapsulates an emergency number.
Displays one address or emergency number configured.

Identifier id

id indicates the policy ID of configured information.

Interface interface-type interface-number

staticDefaults

N/A

CommandPrivileged EXEC mode

Displays the address or emergency number on aninterface.
Displays all addresses or emergency numbers
configured.

Mode

9-22

Command Reference

Usage Guide

LLDP Commands(beta)

If the policy ID is specified, the specified address or emergency number is displayed.
If the interface name is specified, the address or emergency number configured on the interface isdisplayed.
If no parameter is specified, all addresses or emergency numbers are displayed.

Configuration

The following example displays all addresses.

ExamplesRuijie#show lldp location civic-location static
civic location information:--------------------------Identifier:1

country:CH

city:Fuzhou

The following example displays all emergency numbers.
Ruijie#show lldp location elin-location static
elin location information:----------------------Identifier:1elin number:085283671111

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.26 show lldp neighbors
Use this command to display the LLDP information about a neighboring device.
show lldp neighbors [ interface interface-type interface-number ] [ detail ]Parameter

Parameter

Description

Description

interface interface-type interface-number

Interface namedetailAll detailed information about a neighboring device

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

If the detail parameter is not specified, the brief information about a neighboring device is displayed.
If the detail parameter is specified, the detailed information about a neighboring device is displayed.
If the interface parameter is specified, the neighboring device information received on the specified
interface is displayed.

9-23

Command Reference

LLDP Commands(beta)

Configuration

The following example displays the neighboring device information received on all ports.

ExamplesRuijie# show lldp neighbors detail
Lldp neighbor-information of port [GigabitEthernet 0/17]
Neighbor index: 1

Device type

: LLDP Device

Update time

: 1hour 53minutes 30seconds

Aging time

: 5seconds

Chassis ID type

: MAC address

Chassis id: 00d0.f822.33cd

System name: System name

System description: System description

System capabilities supported : Repeater, Bridge, Router
System capabilities enabled: Repeater, Bridge, Router

Management address subtype: 802 mac address

Management address: 00d0.f822.33cd

Interface numbering subtype
Interface number: 0

Object identifier:

LLDP-MED capabilities
Device class:

HardwareRev:

FirmwareRev:

SoftwareRev::

SerialNum:

Manufacturer name:

Asset tracking identifier
Port ID typePort id::: Interface name: GigabitEthernet 0/17

Port description:

802.1 organizationally information
Port VLAN ID: 1

Port and protocol VLAN ID(PPVID) : 1
PPVID Supported: YES

PPVID Enabled: NO

VLAN name of VLAN 1
Protocol Identity: VLAN0001:

802.3 organizationally information

9-24

Command Reference

LLDP Commands(beta)

Auto-negotiation supported: YES

Auto-negotiation enabled: YES

PMD auto-negotiation advertised : 1000BASE-T full duplex mode, 100BASE-TX full duplex mode,
100BASE-TX half duplex mode, 10BASE-T full duplex mode, 10BASE-T half duplex mode
Operational MAU type
PoE support: speed(1000)/duplex(Full): NO

Link aggregation supported: YES

Link aggregation enabled: NO

Aggregation port ID: 0

Maximum frame Size

: 1500

LLDP-MED organizationally information
Power-via-MDI device type:

Power-via-MDI power source:

Power-via-MDI power priority
Power-via-MDI power value::

Description of fields in the command output is as follows:
Field

Description

Neighbor index

Neighbor index

Device typeType of neighboring device

Update time

Latest update time of neighbor information

Aging time

Aging time of a neighbor, namely the time after which aneighbor is aged and deleted

Chassis ID type

Chassis ID type

Chassis ID

Used to identify a device. Usually, a MAC address is used.

System name

Device name

System description

Device description, including hardware/software version andoperating system

System capabilities supported

Functions supported by the system

System capabilities enabled

Functions enabled by the system

Management address subtype

Type of management address

Management address

Management address

Interface numbering subtype

Interface type of management address

Interface number

Interface ID of management address

Object identifier

Object ID of management address
MED device type: network connectivity device and terminal
deviceNetwork connectivity device:
Class I: general terminal device

Device classClass II: media terminal device, including capabilities ofClass I and supporting media stream
Class III: communication terminal device, including
capabilities of Class I and Class II and supporting IP
communication

9-25

Command Reference

LLDP Commands(beta)

HardwareRev

Hardware version

FirmwareRev

Firmware version

SoftwareRev

Software version

SerialNum

Serial number

Manufacturer name

Manufacturer name

Asset tracking identifier

Asset ID

Port ID typePort ID typePort ID

Port ID

Port description

Port description

Port VLAN ID

VLAN ID of a port

Port and protocol VLAN ID

Port and protocol VLAN ID

PPVID Supported

Whether port and protocol VLAN is supported

PPVID Enabled

Whether port and protocol VLAN is enabled

VLAN name of VLAN 1

VLAN 1 nameProtocol Identity

Protocol ID

Auto-negotiation supported

Whether auto-negotiation is supported

Auto-negotiation enabled

Whether auto-negotiation is enabled

PMD auto-negotiation advertised

Port auto-negotiation advertisement capability

Operational MAU type

Rate and duplex status of port auto-negotiation

PoE support

Whether POE is supported

Link aggregation supported

Whether link aggregation is supported

Link aggregation enabled

Whether link aggregation is enabled

Aggregation port ID

ID of link aggregation port

Maximum frame Size

Maximum frame length supported by a port
Device type, including:Power-via-MDI device type



PSE



PD

Power-via-MDI power source

Power type

Power-via-MDI power priority

Power supply priority

Power-via-MDI power value

Power value of a port where power is supplied

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.27 show lldp network-policy
Use this command to display the information about an LLDP network policy.
show lldp network-policy { profile [ profile-num ] | interface interface-type interface-number }9-26

Command Reference

Parameter
Description

LLDP Commands(beta)

Parameter

Description
The information about the specified network policy is

profile [ profile-num ]displayed.The network policy ID ranges from 1 to 1024.

interface interface-type interface-number

Defaults

N/A

CommandPrivileged EXEC mode

Interface name

Mode

Usage Guide

If no parameter is specified, the information about all network policies is displayed.

Configuration

The following example displays the information about a network policy.

ExamplesRuijie# show lldp network-policy profile
network-policy information:-------------------------Network Policy Profile 1
voice vlan 2 cos 4 dscp 6
voice-signaling vlan 2000 cos 4 dscp 6

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.28 show lldp statistics
The following example displays LLDP statistics.
show lldp statistics [ global | interface interface-type interface-number ]Parameter

Parameter

Description

Description

globalDisplays the global LLDP statistics.

interface interface-type interface-number

Displays the LLDP statistics of the specified interface.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

If no parameter is specified, the information about all LLDP statistics is displayed.

Configuration

The following example displays all LLDP statistics.

ExamplesRuijie# show lldp statistics

9-27

Command Reference

LLDP Commands(beta)

lldp statistics global Information:
Neighbor information last changed time : 1hour 52minute 22second
The number of neighbor information inserted : 2
The number of neighbor information deleted : 0
The number of neighbor information dropped : 0
The number of neighbor information age out : 1-----------------------------------------------------------Lldp statistics information of port [GigabitEthernet 0/17]-----------------------------------------------------------The number of lldp frames transmitted
The number of frames discarded
The number of error frames

: 0
: 0

The number of lldp frames received
The number of TLVs discarded

: 26

: 12

: 0

The number of TLVs unrecognized: 0

The number of neighbor information aged out : 0

Description of fields in the command output is as follows:
Field

Description

Neighbor information last change time

Time the neighbor information is latest updated

The number of neighbor information
inserted
The number of neighbor information
deletedThe number of neighbor information
droppedNumber of times of adding neighbor information

Number of times of removing neighbor information

Number of times of dropping neighbor information

The number of neighbor information

Number of the neighbor information entries that haveaged out

aged out

The number of lldp frames transmitted

Total number of the LLDPDUs transmitted

The number of frames discarded

Total number of the LLDPDUs discarded

The number of error frames

Total number of the LLDP error frames received

The number of lldp frames received

Total number of the LLDPDUs received

The number of TLVs discarded

Total number of the LLDP TLVs dropped

The number of TLVs unrecognized

Total number of the LLDP TLVs that cannot berecognized

The number of neighbor information

Number of the neighbor information entries that haveaged out

aged out

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9-28

Command Reference

LLDP Commands(beta)

9.29 show lldp status
Use this command to display LLDP status information.
show lldp status [ interface interface-type interface-number ]Parameter
Description

Parameter

Description

interface interface-type interface-number

Defaults

N/A

CommandPrivileged EXEC mode

Displays the LLDP status information of the specified
interface.

Mode

Usage Guide

If no parameter is specified, the LLDP status information of all ports is displayed.

Configuration

The following example displays LLDP status information of all ports.

ExamplesRuijie# show lldp status
Global status of LLDP

: Enable

Neighbor information last changed time : 1hour 52minute 22second
Transmit interval: 30s

Hold multiplier: 4

Reinit delay: 2sTransmit delay: 2s

Notification interval
Fast start counts

: 5s
: 3

-----------------------------------------------------------Port [GigabitEthernet 0/17]-----------------------------------------------------------Port status of LLDPPort state: Enable: UP

Port encapsulation
Operational mode

: Ethernet II: RxAndTx

Notification enable: NO

Error detect enable: YES

Number of neighbors: 1

Number of MED neighbors: 0

Description of fields in the command output is as follows:
Field

Description

Global status of LLDP

Whether LLDP is globally enabled

Neighbor information last changed time

Time the neighbor information is latest updated

Transmit interval

LLDPDU transmit interval

9-29

Command Reference

LLDP Commands(beta)

Hold multiplier

TTL multiplier

Reinit delay

Port re-initialization delay

Transmit delay

LLDPDU transmit delay

Notification intervalInterval for sending LLDP Traps

Fast start counts

The number of fast sent LLDPDUs

Port status of LLDP

Whether LLDP is enabled on the port

Port state

Link status of port: UP or DOWNPort encapsulation

LLDPDU encapsulation format

Operational mode

Operating mode of LLDP

Notification enable

Whether LLDP Trap is enabled on the port

Error detect enable

Whether error detection is enabled on the port

Number of neighbors

Number of neighbors

Number of MED neighbors

Number of MED neighbors

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.30 show lldp tlv-config
Use this command to display the advertisable TLV configuration of a port.
show lldp tlv-config [ interface interface-type interface-number ]Parameter
Description

Parameter

Description

interface interface-type interface-number

Defaults

N/A

CommandPrivileged EXEC mode

Displays the LLDP TLV configuration of thespecified interface.

Mode

Usage Guide

If no parameter is specified, the LLDP TLV configuration of all ports is displayed.

Configuration

The following example displays TLV information of port 17.

ExamplesRuijie# show lldp tlv-config interface GigabitEthernet 0/17
LLDP tlv-config of port [GigabitEthernet 0/17]---------------------------------------------------NAME

STATUS DEFAULT--------------------------------- ------ ----------Basic optional TLV:

9-30

Command Reference

LLDP Commands(beta)

Port Description TLVYES YES

System Name TLVYES YES

System Description TLVYES YES

System Capabilities TLVYES YESManagement Address TLVYES YESIEEE 802.1 extend TLV:Port VLAN ID TLVYES YESPort And Protocol VLAN ID TLVYES YESVLAN Name TLVYES YESIEEE 802.3 extend TLV:
MAC-Physic TLVYES YESPower via MDI TLVYES YES

Link Aggregation TLVYES YES

Maximum Frame Size TLVYES YESLLDP-MED extend TLV:Capabilities TLVYES YES

Network Policy TLVYES YES

Location Identification TLVNOExtended Power via MDI TLVYES YES

Inventory TLVYES YESNO

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

9.31 voice vlan
Use this command to configure the LLDP network policy. Use the no form of this command to delete
the policy.
{ voice | voice-signaling } vlan { { { vlan-id | dot1p } [ cos cos | dscp dscp ] } | none | untagged }no { voice | voice-signaling } vlan

Parameter

Parameter

Description

Description

voice

Voice application

voice-signaling

Voice-signaling application(Optional) The tagged frame is sent in the voice VLAN in VoIP.

vlan-id

The tagged frame includes user_priority and VLAN ID.
The VLAN ID of voice flow ranges from 1 to 4094.

9-31

Command Reference

dot1p

LLDP Commands(beta)(Optional) The tagged frame is sent in the voice VLAN in VoIP.
The tagged frame contains only user_priorit. The VLAN ID is 0.
(Optional) The tagged frame is sent in the voice VLAN in VoIP.

cos cos

The CoS (Class of service) value of the voice flow ranges from 0 to 7.
The default value is 5.
(Optional) The tagged frame is sent in the voice VLAN in VoIP.

dscp dscp

The DSCP (Differentiated services code point) value of the voice flow
ranges from 0 to 63. The default value is 46.

none

untagged(Optional) The network policy is not advertised. VoIP determines the
network policy based on its configuration.
(Optional) The untagged frame is sent in the voice vlan in VoIP. In
this case, the value of vlan id and cos are ignored.

Defaults

The network policy is not advertised. VoIP determines the network policy based on its configuration.

Command

LLDP network policy configuration mode

Mode

Usage Guide

In the LLDP network policy configuration mode, configure the LLDP network policy.
Voice indicates the voice data type, and voice-signaling indicates the voice signal type.
If a device connects to an IP phone and the IP phone supports LLDP-MED, the network policy TLV
can be configured to deliver policies to the IP phone, so that the IP phone changes the voice stream
tag and QoS.Excluding the preceding policy, the following operations need to be performed on thedevice:1. Enable the voice VLAN function and add the port connected to the IP phone to the voice VLAN in
static mode.
2. Configure the port connected to the IP phone to a QoS trusted port. (It is recommended to use thetrusted DSCP mode.)
3. If 802.1X authentication is enabled on the port at the same time, a security channel needs to be
configured to transmit packets from the voice VLAN.
If the IP phone does not support LLDP-MED, the voice VLAN function must be enabled. In addition,
the MAC address of the IP phone needs to be added to the voice VLAN OUI list manually.
For details about how to configure the QoS trusted mode, see Configuring QoS. For details about
how to configure the security channel, see “”Configuring ACL.

The show lldp network-policy profile [ profile-num ] command can be used to display the LLDP
network policy.

Configuration

The following example configures the LLDP network policy (profile-num is 1).

ExamplesRuijie#config
Ruijie(config)#lldp network-policy profile 1
Ruijie(config-lldp-network-policy)# voice vlan untagged
Ruijie(config-lldp-network-policy)# voice-signaling vlan 3 cos 4

9-32

Command Reference

LLDP Commands(beta)

Ruijie(config-lldp-network-policy)# voice-signaling vlan 3 dscp 6

RelatedCommand

Description

Commands

show lldp network-policy profile

Displays the LLDP network policy.

Platform

N/A

Description

9-33

Command Reference

ERPS Commands(beta)

10 ERPS Commands(beta)
10.1 associate sub-ring
Use this command to associate the Ethernet ring with its sub-rings.
associate sub-ring raps-vlan sub-ring-vlan-list
no associate sub-ring raps-vlan sub-ring-vlan-list

Parameter
Description

Parameter

Description

sub-ring-vlan-list

Sub-rings’ R-APS VLAN. The VLAN ID ranges from 1 to 4094.

Defaults

By default, Ethernet ring is not associated with its sub-rings.

Command

ERPS configuration mode.

Mode

Usage Guide

You need to configure this command on all nodes of the Ethernet ring, so as to transmit its sub-ring’s
ERPS protocol packets in the Ethernet ring.
Configuring the association is mainly to make the sub-ring’s protocol packets transmit in the Ethernet
ring. Users can also adopt the configuration command provided by the VLAN module to configure
elaborately the VLAN and the relation between ports and VLAN, so as to transmit the sub-ring’s
protocol packets in other Ethernet rings and not leak the packets to the user network.
The feature is not supported by G.hn ports.

Configuration

The following example associates the Ethernet sub-ring with other Ethernet rings:

Examples

1. Enter the privileged EXEC mode and configure the link mode of the Ethernet ring port and thedefault VLAN.
Ruijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# exit
Ruijie(config)# interface GigabitEthernet 0/18
Ruijie(config-if-GigabitEthernet 0/18)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/18)# exit
2. Enter the erps configuration mode and add the ports that participate in the ERPS protocol
computing to the Ethernet ring.
Ruijie(config)# erps raps-vlan 4093
Ruijie(config-erps4093)# ring-port west GigabitEthernet 0/17 east GigabitEthernet 0/18
3. Configure the Ethernet subring.
Ruijie(config)# erps raps-vlan 100
Ruijie(config)# interface TenGigabitEthernet 0/19

10-1

Command Reference

ERPS Commands(beta)

Ruijie(config-if-TenGigabitEthernet 0/19)# switchport mode trunk
Ruijie(config-if-TenGigabitEthernet 0/19)# exit
Ruijie(config)# erps raps-vlan 100
Ruijie(config-erps100)# ring-port west TenGigabitEthernet 0/19 east virtual-channel
Ruijie(config-if-TenGigabitEthernet 0/19)# exit
4. Associate the subring with other Ethernet rings.
Ruijie(config)# erps raps-vlan 4093
Ruijie(config-erps4093)# associate sub-ring raps-vlan 100

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.2 erps enable
Use this command to enable the ERPS function in the global configuration mode. Use the no form of
this command to restore the default setting.
erps enable
no erps enable

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

ERPS is enabled by default.

Command

Global configuration mode.

Mode

Usage Guide

The ERPS protocol of the specified ring will begin running truly only after the global ERPS protocol
and the ERPS protocol of the specified ring are both enabled.
After entering the ERPS configuration mode of the specified ring, configure the state enablecommand to enable the ERPS protocol of this specified ring.

Configuration

The following example enables the ERPS protocol globally:

Examples

1. Enter the privileged EXEC mode, enable the ERPS function globally.
Ruijie# configure terminal
Ruijie(config)# erps enable
2. Enter the ERPS configuration mode and enable the ERPS function for the specified ring.
Ruijie(config)# erps raps-vlan 4093

10-2

Command Reference

ERPS Commands(beta)

Ruijie(config-erps4093)# state enable

RelatedCommands

Command

Description

state enable

Enables the ERPS protocol of the specified ring in the
ERPS mode of the specified ring.

Platform

N/A

Description

10.3 erps monitor link-state by oam
Use this command to configure the method of monitoring the ERPS link state.
erps monitor link-state by oam vlan vlan-id
no erps monitor link-state by oam

Parameter
Description

Parameter

Description

vlan-id

Indicates the VLAN that monitors link state.
The VLAN ID ranges from 1 to 4094.

Defaults

By default, it adopts the directly monitoring the link physical state (up or down) rather than the oam
method.

Command

Global configuration mode.

Mode

Usage Guide

For the link state monitoring, use the method of directly monitoring the link physical state (up or
down), also monitor the logic state (unidirectional fault, bidirectional fault or normal) of the link by the
OAM. By default, the former is adopted. If the OAM method is used, the inefficient link statemonitoring may cause the convergence time longer when the topology changes.

Configuration

The following example configures the method of monitoring the link state.

Examples

1. Enter the privileged EXEC mode and configure the method of monitoring the link state.
Ruijie# configure terminal
Ruijie(config)# erps monitor link-state by oam vlan 100

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10-3

Command Reference

ERPS Commands(beta)

10.4 erps raps-vlan
Use this command to configure the R-APS VLAN of Ethernet ring.
erps raps-vlan vlan-id
no erps raps-vlan vlan-id

Parameter
Description

Parameter

Description

vlan-id

R-APS VLAN ID. The VLAN ID ranges from 1 to 4094.

Defaults

No R-APS VLAN is configured by default.

Command

Global configuration mode.

Mode

Usage Guide

The R-APS VLAN must be the VLAN that is not used on the device. Cannot set the VLAN1 to the
R-APS VLAN.
The same Ethernet ring of different devices needs the same R-APS VLAN.
If you want to transparently transmit the ERPS protocol packets on a device without the ERPS
function configured, make sure that only the two ports connected to the Ethernet ring on this device
allow the R-APSA VLAN packets corresponding to this ERPS ring passing through. Otherwise, theother VLAN packets may enter the R-APS VLAN through the transparent transmission, causing theshock to the ERPS ring.

Configuration

The following example configures the R-APS VLAN globally.

ExamplesRuijie# configure terminal
Ruijie(config)# erps raps-vlan 4093

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.5 protected-instanceUse this command to specify the instance protected by the Ethernet ring to implement the loadbalance function.
protected-instance instance-id-list
no protected-instanceParameter

Parameter

Description

10-4

Command Reference

ERPS Commands(beta)

Description
instance-id-list

ID of the instance protected by this Ethernet ring.
The instance ID ranges from 0 to 64.

Defaults

All instances are protected by default.

CommandEPRS configuration mode.

Mode

Usage Guide

The protected VLAN consists of the R-APS VLAN of this Ethernet ring and the data VLAN protectedby this Ethernet ring.
Run the instance instance-id vlan vlan-range command to map VLANs to an instance before runningthe protected-instance instance-id-list command to specify the instance protected by the Ethernet
ring. You can implement load balance by configuring more than one Ethernet ring to protect different
instances.
If no instance is specified, all VLANs will be protected. If the instance is specified but no VLAN are
mapped to the instance, no VLAN will be protected..

Configuration

Suppose that the ERP1 and ERP2 are configured on the switch to implement the load balance. The

ExamplesR-APS VLAN of the ERPS1 is 100, the protected data VLAN is in the range of 1 to 99 and 101-2000,
the R-APS VLAN of the ERPS2 is 4093, and the protected data VLAN is in the range of 2001 to 4092
and 4094. The following example configures load balance.
1. Enter the privileged EXEC mode.
Ruijie# configure terminal
2. Configure the VLAN configured by the ERP1.
Ruijie(config)# spanning-tree mst configuration
Ruijie(config-mst)# instance 1 vlan 100, 1-99, 101-2000
Ruijie(config-mst)# exit
Ruijie(config)# erps raps-vlan 100
Ruijie(config-erps100)#protected-instance 1
3. Configure the VLAN configured by the ERP2.
Ruijie(config)# spanning-tree mst configuration
Ruijie(config-mst)# instance 2 vlan 4093, 2001-4092, 4094
Ruijie(config-mst)# exit
Ruijie(config)# erps raps-vlan 4093
Ruijie(config-erps4093)#protected-instance 2

RelatedCommands

Platform

Command

Description

instance

Configures instance and VLAN mapping relations.

N/A

Description

10-5

Command Reference

ERPS Commands(beta)

10.6 ring-port
Use this command to configure the ERPS ring.
ring-port west { interface-type interface-number | virtual-channel } east { interface-type
interface-number | virtual-channel }no ring-port

Parameter
Description

Parameter

Description

west interface-type interface-number

Specifies an interface as the West port of the ERPS ring.

west virtual-channel

Specifies the virtual interface as the West port of the ERPS
ring.

east interface-type interface-number

Specifies an interface as the East port of the ERPS ring.

east virtual-channel

Specifies the virtual interface as the East port of the ERPS
ring.

Defaults

No ERPS ring is configured by default.

CommandEPRS configuration mode.

Mode

Usage GuideAfter adding the port to the ERP ring, the trunk attribute of the port is not allowed to be modified
any more.



If the ring port is configured on the virtual-channel, this ring will be considered as a sub-ring.

Ports running the ERPS do not participate in the STP computing. ERPS, RERP and REUP donot share the port.



The feature is not supported by G.hn ports.

Configuration

The following example configures the ERPS ring.

Examples

1. Enter the privileged EXEC mode.
Ruijie# configure terminal
2. Configure the link mode of the Ethernet ring port and the default VLAN.
Ruijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# exit
Ruijie(config)# interface GigabitEthernet 0/18
Ruijie(config-if-GigabitEthernet 0/18)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/18)# exit
3. Enter the ERPS configuration mode and add the ports that participate in the ERPS protocol
computing to the Ethernet ring.
Ruijie(config)# erps raps-vlan 4093
Ruijie(config-erps4093)# ring-port west GigabitEthernet 0/18 east GigabitEthernet 0/18

RelatedCommand

Description

10-6

Command Reference

ERPS Commands(beta)

Commands
Enables the ERPS protocol of the specified ring in the ERPS

state enable

mode of the specified ring.
Configures the L2 interface (switch port) mode to be Trunkswitchport mode

Platform

N/A

Description

10.7 rpl-port
Use this command to configure the RPL port and RPL owner.
rpl-port { west | east } [ rpl-owner ]no rpl-port

Parameter
Description

Parameter

Description

west

Specifies the West port as the RRL port.

east

Specifies the East port as the RRL port.

Defaults

No RPL port and RPL owner are configured.

CommandEPRS configuration mode.

Mode

Usage Guide

Up to one RPL link and one RPL owner node are needed and configurable for each ring.
The feature is not supported by G.hn ports.

Configuration

The following example configures the RPL port and RPL owner.

Examples

1. Enter the privileged EXEC mode.
Ruijie# configure terminal
2. Configure the link mode of the Ethernet ring port and the default VLAN.
Ruijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# exit
Ruijie(config)# interface GigabitEthernet 0/18
Ruijie(config-if-GigabitEthernet 0/18)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/18)# exit
3. Enter the ERPS configuration mode.
Ruijie(config)# erps raps-vlan 4093
4. Add the ports that participate in the ERPS protocol computing to the Ethernet ring.
Ruijie(config-erps4093)# ring-port west GigabitEthernet 0/17 east GigabitEthernet 0/18
5. Specify the port where the RPL link is and the RPL owner.

10-7

Command Reference

ERPS Commands(beta)

Ruijie(config-erps4093)# rpl-port west rpl-owner

RelatedCommands

Command

Description

ring-port

Configures the specified ERP ring in the ERPS
configuration mode of the specified ring.
Enables the ERPS protocol of the specified ring in thestate enable

ERPS configuration mode of the specified ring.

Platform

N/A

Description

10.8 show erps
Use this command to show the parameters and states of the ERPS.
show erps [ global | raps_vlan vlan-id [ sub-ring ] ]Parameter
Description

Parameter

Description

globalDisplays global ERPS information.

raps_vlan vlan-id

Displays specified ERPS information. The VLAN ID ranges from 1 to4094.

sub-ring

Defaults

N/A

CommandAny mode.

Displays specified sub ring information.

Mode

Usage Guide

N/A

Configuration

The following example shows the use of this command.

ExamplesRuijie# show erps
ERPS Information
Global Status: Disabled

Link monitored by: Oam

Oam monitored vid: 1000------------------------------------------R-APS VLAN

: 1000Ring Status: DisabledWest Port: Te0/19

East Port: Virtual Channel

RPL Port: NoneProtected VLANs: ALL(Link Normal)

10-8Command Reference

ERPS Commands(beta)

RPL Owner: Disabled

Holdoff Time: 0 milliseconds

Guard Time

: 500 milliseconds

WTR Time: 2 minutes

Current Ring State: initialize

Associate R-APS VLAN:------------------------------------------R-APS VLAN

: 2000Ring Status: DisabledWest Port: NoneEast Port: NoneRPL Port: NoneProtected VLANs: ALL

RPL Owner: Disabled

Holdoff Time: 0 milliseconds

Guard Time

: 500 milliseconds

WTR Time: 2 minutes

Current Ring State: initialize

Associate R-APS VLAN:------------------------------------------R-APS VLAN

: 4093

Ring Status: DisabledWest Port: Gi0/17(Link Normal)

East Port: Gi0/18(Link Normal)

RPL Port: West Port

Protected VLANs: NoneRPL Owner: Enabled

Holdoff Time: 0 milliseconds

Guard Time

: 500 milliseconds

WTR Time: 2 minutes

Current Ring State: initialize

Associate R-APS VLAN

: 1000Description of fields in the command output is as follows:
Field

Description
Global ERPS status

Global Status

Link monitored byEnabled: Global ERPS is enabled.

Disabled: Global ERPS is disabled.

Not Oam: The ERPS link is not monitored by OAM. Oam: The ERPS
link is monitored by OAM.

Oam monitored vid

ID of the VLAN whose link connectivity is monitored by OAM.

R-APS VLAN

The R-APs VALN ID

Ring Status

Enabled: ERPS ring is enabled.

Disabled: ERPS ring is disabled.

10-9

Command Reference

ERPS Commands(beta)

West Port

The West port of the ERPS ring.

East Port

The East port of the ERPS ring.

RPL PortWest Port: The West port is specified as the RPL port.

East Port: The East port is specified as the RPL port. None: No RPL
port is configured.

Protected VLANs

RPL Owner

ALL: All VLANs are protected.

1-4094: Some VLANs are protected.

None: No VLAN is protected.

Enabled: The current device is the RPL owner of the Ethernet ring.



Disabled: The current device is not the RPL owner of the Ethernetring.

The Holdoff timer is used to delay topology switchover upon link failure.
Holdoff Time

Range: 1-100. This value, multiplied by 100 milliseconds, equals theHoldfoff time.
The Guard timer is used to delay response to SF R-APS packets after the

Guard Timefailed link recovers.
Range: 1-200. This value, multiplied by 10 milliseconds, equals the Guard
time.
The WTR timer is used to delay re-blocking the RPL Owner port after the

WTR Time

Current Ring State
Sub-Ring R-APS VLANs
TC Propagation State

RelatedCommands

Platform

failed link recovers.


Range: 1-12 minutes.



Idle: No failure on the ring; the node is performing normally.

Protection: A failure occurs on the ring.

ID of the R-APS VLAN of the subring.
Enable: Enables notification upon subring topology change.

Disable: Disables notification upon subring topology change.

Command

Description

erps enable

Enables the global ERPS protocol.

N/A

Description

10.9 state enable
Use this command to enable the ERPS ring. Use the no form of this command to disable thespecified ERPS ring.
state enable
no state enable

Parameter
Description

Parameter

Description

10-10

Command Reference

N/A

Defaults

Disabled

CommandEPRS configuration mode.

ERPS Commands(beta)

N/A

Mode

Usage Guide

Only after the global ERPS protocol and the ERPS protocol of the specified ring are both enabled, the
ERPS protocol of the specified ring will begin truly running.

Configuration

The following example enables the specified ERPS ring:

Examples

1. Enter the privileged EXEC mode.
Ruijie# configure terminal
2. Configure the link mode of the Ethernet ring port and the default VLAN.
Ruijie(config)# interface GigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# exit
Ruijie(config)# interface GigabitEthernet 0/18
Ruijie(config-if-GigabitEthernet 0/18)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/18)# exit
3. Enter the ERPS configuration mode. Add the ports that participate in the ERPS protocol computing
to the Ethernet ring. Enable the ERPS function for the specified ring.
Ruijie(config)# erps raps-vlan 4093
Ruijie(config-erps4093)# ring-port west GigabitEthernet 0/17 east GigabitEthernet 0/18
Ruijie(config-erps4093)# state enable
4. Enable the global ERPS function.
Ruijie(config-erps4093)# exit
Ruijie(config)# erps enable

RelatedCommands

Platform

Command

Description

erps enable

Enables the global ERPS protocol.

N/A

Description

10.10 sub-ring tc-propagation
Use this command to specify the devices corresponding to the crossing node on the crossing ringwhether to send out the notification when the subring topology changes.
sub-ring tc_propagation enable
no sub-ring tc_propagation

Parameter

Parameter

Description

10-11

Command Reference

ERPS Commands(beta)

Description
enableEnables notification upon subring topology change.

Defaults

By default, the topology changing notification is not sent.

CommandEPRS configuration mode.

Mode

Usage Guide

This command is just needed to be configured on the crossing nodes on the crossing ring.

Configuration

The following example enables notification upon subring topology change.

ExamplesRuijie> enable
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/17)# exit
Ruijie(config)# interface gigabitethernet 0/18
Ruijie(config-if-GigabitEthernet 0/18)# switchport mode trunk
Ruijie(config-if-GigabitEthernet 0/18)# exit
Ruijie(config)# erps raps-vlan 4093
Ruijie(config-erps 4093)# ring-port west gigabitethernet 0/17 east gigabitethernet 0/18
Ruijie(config-erps 4093)# associate sub-ring raps-vlan 100
Ruijie(config-erps 4093)# state enable
Ruijie(config-erps 4093)# exit
Ruijie(config)# interface tengigabitethernet 0/19
Ruijie(config-if-TenGigabitEthernet 0/19)# switchport mode trunk
Ruijie(config-if-TenGigabitEthernet 0/19)# exit
Ruijie(config)# erps raps-vlan 100
Ruijie(config-erps 100)# ring-port west tengigabitethernet 0/19 east virtual-channel
Ruijie(config-erps 100)# sub-ring tc-propagation enable
Ruijie(config-erps 100)# state enable
Ruijie(config-erps 100)# exit
Ruijie(config)# erps enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.11 timer
Use this command to configure the timer of the ERPS protocol.

10-12Command Reference

ERPS Commands(beta)

timer { holdoff-time holdoff | guard-time guard | wtr-time wtr }no timer { holdoff-time | guard-time | wtr-time }Parameter
Description

Defaults

Parameter

Description

holdoff-time holdoff

Value of the Holdoff timer in 100 milliseconds, the valid range is 0 to 100.

guard-time guard

Value of the Guard timer in 10 milliseconds, the valid range is 1 to 200.

wtr-time wtr

Value of the WTR in minute, the valid range is 1 to 12.

Holdoff timer: 0 milliseconds.
Guard timer: 500 milliseconds.
WTP timer: 2 seconds.

CommandEPRS configuration mode.

Mode

Usage Guide

Holdoff timer: This timer is used to avoid the ERPS from topology swithcing continuously due to thelink intermittent fault. With this timer configured, if the link fault is detected, the ERPS does not
perform the topology switching immediately until the timer times out and the link fault is verified.
Guard timer: This timer is used to prevent the device receiving the timed-out R-APS messages.
When the device detects the recovery from failure of the link, it sends out the message of link
recovery and starts up the Guard timer. Before the Guard times out, except for the flush packets
indicating the subring topology change, other packets are discarded directly without being handled.
WTR (Wait-to-restore) timer: This timer is only valid for the RPL owner device. It is mainly used toprevent the RPL owner making the erroneous judgment to the ring network status. When the RPL
detects the fault recovery, it does not perform the topology switching immediately until the WTR times
out and the Ethernet ring indeed recovers from the fault. If the ring network fault is checked again
before the WTR times out, then the WTR timer will be canceled and topology switching will be notexecuted any longer.

Configuration

The following example configures the timer of the ERPS protocol.

ExamplesRuijie# configure terminal
Ruijie(config)# erps raps-vlan 4093
Ruijie(config-erps4093)# timer holdoff-time 10
Ruijie(config-erps4093)# timer guard-time 10
Ruijie(config-erps4093)# timer wtr-time 10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10-13

ACL & QoS Configuration Commands
1. ACL Commands
2. QoS Commands

Command Reference

ACL Commands

1 ACL Commands
1.1 access-list
Use this command to create an access list to filter data packets. Use the no form of this command to
remove the specified access list.
1.

Standard IP access list (1 to 99, 1300 to 1999)

access-list acl-id { deny | permit } { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } [ time-range time-range-name ] [ log ]2.

Extended IP access list (100 to 199, 2000 to 2699)

access-list acl-id { deny | permit } protocol { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } [ eq port | gt port | lt port | neq port | range lower upper ]{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address } [ dscp
dscp ] [ fragment ] [ precedence precedence ] [ tos tos ] [ eq port | gt port | lt port | neq port | range
lower upper ] [ match-all tcp-flag | established ] [ time-range time-range-name ] [ log ]3.

Extended MAC access list (700 to 799)

access-list acl-id { deny | permit } { source-mac-address mask | any | host source-mac-address }{ destination-mac-address mask | any | host destination-mac-address } [ ethernet-type ] [ cos [ cos ][ inner cos ] ] [ time-range time-range-name ]4.

Extended expert access list (2700 to 2899)

access-list acl-id { deny | permit } [ protocol | [ ethernet-type ] [ cos [ cos ] [ inner cos ] ] ] [ VID [ vid ][ inner vid ] ] { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address }{ source-mac-address mask | any | host source-mac-address } [ eq port | gt port | lt port | neq port |range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any | hostdestination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port | neq port
| range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ match-all
tcp-flag | established ] [ time-range time-range-name ]When you select the Ethernet-type field or cos field:

access-list acl-id { deny | permit } { ethernet-type | cos [ cos ] [ inner cos ] } [ VID [ vid ] [ inner vid ] ]{ source-mac-address mask | any | host source-mac-address } { any | hostdestination-mac-address } [ time-range time-range-name ]When you select the protocol field:

access-list acl-id { deny | permit } protocol { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination } { any | host destination-mac-address } [ eq port | gt port | lt port | neq port | range
lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ match-all tcp-flag |established ] [ time-range time-range-name ]Extended expert ACLs of some important protocols:

Internet Control Message Protocol (ICMP)
access-list acl-id { deny | permit } icmp { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address }1-1

Command Reference

ACL Commands{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address } { any |host destination-mac-address } [ icmp-type ] [ [ icmp-type [ icmp-code ] ] | [ icmp-message ] ] [ dscp
dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ time-range time-range-name ]Transmission Control Protocol (TCP)
access-list acl-id { deny | permit } tcp{ source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port |neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ match-all tcp-flag | established ] [ time-range time-range-name]
User Datagram Protocol (UDP)
access-list acl-id { deny | permit } udp { source-ipv4-address source-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port |neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ time-range time-range-name ]Parameter
Description

Parameteracl-idDescription
Access list number. The ranges available are 1 to 99, 100 to 199,
1300 to 1999, 2000 to 2699, 2700 to 2899, and 700 to 799

deny

If not matched, access is denied

permitIf matched, access is permitted

source-ipv4-address

Specify the source IP address (host address or network address)

source-ipv4-wildcard

It can be discontinuous, for example, 0.255.0.32
IP protocol number. It can be one of EIGRP, GRE, IPINIP, IGMP,

protocolNOS, OSPF, ICMP, UDP, TCP, and IP. It can also be a number
representing the IP protocol between 0 and 255. The important
protocols such as ICMP, TCP, and UDP are described separately

destination-ipv4-address
destination-ipv4-wildcard

Specify the destination IP address (host address or network address)
Wildcard of the destination IP address. It can be discontinuous, forexample, 0.255.0.32

fragment

Packet fragment filtering

dscp

Differentiated service code point

dscp

Code point value, ranging from 0 to 63

precedence

Specify the packet priority

precedence

Packet precedence value (0 to 7)eq

Equal operator

gt

Greater operator

lt

Smaller operator

neq

Unequal operator

port

Layer4 port number

range

Layer4 port number range of the packet

1-2Command Reference

ACL Commands

lower

Lower limit of the layer4 port number

upper

Upper limit of the layer4 port number

time-range

Time range of packet filteringtime-range-name

Time range name of packet filteringtos

Specify type of service

tos

ToS value (0 to 15)

icmp-type

ICMP message type (0 to 255)

icmp-code

ICMP message type code (0 to 255)

icmp-message

ICMP message type namehost source-mac-address

Source physical address

host

Destination physical address

destination-mac-address
cos cos

Match the specified cos field in the outer tag

inner cos

Match the specified cos field in the inner tag

VID vid

Match the specified VLAN ID field in the outer tag

inner vid

Match the specified VLAN ID field in the inner tag

ethernet-type

Ethernet typematch-all

Match all the bits of the TCP flag

tcp-flagMatch the TCP flag

established

Match the RST or ACK bits, not other bits of the TCP flag
Logs will be periodically output if packets matching the ACEs are

log

found

Defaults

N/A

Command

Global configuration mode.

Mode

Usage Guide

To filter the data by using the access control list, you must first define a series of rule statements byusing the access list. You can use ACLs of the appropriate types according to the security needs:
The standard IP ACL (1 to 99, 1300 to 1999) only controls the source IP addresses.
The extended IP ACL (100 to 199, 2000 to 2699) can enforce strict control over the source anddestination IP addresses.
The extended MAC ACL (700 to 799) can match against the source/destination MAC addresses andEthernet type.
The extended expert access list (2700 to 2899) is a combination of the above and can match and filter
the VLAN ID.
For the layer-3 routing protocols including the unicast routing protocol and multicast routing protocol,
the following parameters are not supported by the ACL: precedence precedence/tos
tos/fragments/range lower upper/time-range time-range-name
The TCP Flag includes part or all of the following:


urg



ack



psh

1-3

Command Reference

ACL Commands



rst



syn



fin

The packet precedence is as below:


critical



flash



flash-override

immediateinternet

networkpriorityroutine

The service types are as below:

max-reliability

max-throughput



min-delay

min-monetary-cost

normalThe ICMP message types are as below:administratively-prohibited

dod-host-prohibited

dod-net-prohibited



echo



echo-replyfragment-time-exceeded

general-parameter-problem

host-isolated

host-precedence-unreachablehost-redirecthost-tos-redirecthost-tos-unreachablehost-unknownhost-unreachable



information-reply

information-request



mask-replymask-requestmobile-redirect

net-redirect

net-tos-redirect

net-tos-unreachable

1-4

Command Reference

ACL Commands



net-unreachable

network-unknown

no-room-for-option

option-missing

packet-too-bigparameter-problem



port-unreachableprecedence-unreachable

protocol-unreachableredirect

device-advertisement

device-solicitationsource-quenchsource-route-failed

time-exceededtimestamp-reply

timestamp-requestttl-exceeded

unreachable

The TCP ports are as follows. A port can be specified by port name and port number:


bgp



chargencmd



daytimediscard

domain



echo



exec



finger

ftp



ftp-datagopherhostname



ident



irc



kloginkshell



ldp



login



nntp



pim-auto-rp



pop2



pop3

1-5

Command Reference

ACL Commands



smtp



sunrpc

syslogtacacstalktelnet



time



uucp



whois



www

The UDP ports are as follows. A UDP port can be specified by port name and port number.


biff



bootpcbootps

discard



dnsix



domainecho

isakmp

mobile-ipnameserver

netbios-dgm



netbios-ns

netbios-ss



ntp



pim-auto-rp



rip



snmp



snmptrap

sunrpc

syslogtacacs



talk



tftp



time



who



xdmcp

The Ethernet types are as below:


aarp



appletalk

decnet-iv

diagnostic

1-6

Command Reference

ACL Commands

etype-6000



etype-8042



lat



lavc-sca

mop-console

mop-dump



mumps



netbios

vines-echoxns-idp

Configuration

1. Example of the standard IP ACL

ExamplesThe following basic IP ACL allows the packets whose source IP addresses are 192.168.1.64 192.168.1.127 to pass:
Ruijie(config)# access-list 1 permit 192.168.1.64 0.0.0.63
2. Example of the extended IP ACL
The following extended IP ACL allows the DNS messages and ICMP messages to pass:
Ruijie(config)# access-list 102 permit tcp any any eq domain log
Ruijie(config)# access-list 102 permit udp any any eq domain log
Ruijie(config)# access-list 102 permit icmp any any echo log
Ruijie(config)# access-list 102 permit icmp any any echo-reply
3. Example of the extended MAC ACLThis example shows how to deny the host with the MAC address 00d0f8000c0c to provide service
with the protocol type 100 on gigabit Ethernet port 0/17. The configuration procedure is as below:
Ruijie(config)# access-list 702 deny host 00d0f8000c0c any aarp
Ruijie(config)# interface gigabitEthernet0/17
Ruijie(config-if-GigabitEthernet 0/17)# mac access-group 702 in
4. Example of the extended expert ACL
The following example shows how to create and display an extended expert ACL. This expert ACL
denies all the TCP packets with the source IP address 192.168.12.3 and the source MAC address
00d0.f800.0044.
Ruijie(config)# access-list 2702 deny tcp host 192.168.12.3 0.0.0.0 00d0.f800.0044
0000.0000.0000 any any
Ruijie(config)# access-list 2702 permit any any any any
Ruijie(config)# show access-lists
expert access-list extended 2702
10 deny tcp host 192.168.12.3 host 00d0.f800.0044 any any
10 permit any any any any

RelatedCommands

Command

Description

show access-lists

Show all the ACLs.

mac access-group

Apply the extended MAC ACL on the interface.

1-7

Command Reference

Platform

ACL Commands

N/A

Description

1.2 access-list list-remark
Use this command to write a helpful comment (remark) for an access list. Use the no form of thiscommand to remove the remark.
access-list acl-id list-remark commentno access-list acl-id list-remark

Parameter
Description

Parameter

Description
Access list number.
Standard IP ACL: 1 to 99, 1300 to 1999.

acl-idExtended IP ACL: 100 to 199. 2000 to 2699.
Extended MAC ACL: 700 to 799.
Extended Expert ACL: 2700 to 2899.

comment

Comment that describes the access list.

Defaults

The access lists have no remarks by default.

Command

Global configuration mode

Mode

Usage Guide

You can use this command to write a helpful comment for a specified access list. If the specified
access list does not exist, the command will create the access list, then add remarks for the accesslist.

Configuration

The following example writes a comment of “this acl is to filter the host 192.168.4.12” for ACL100.

ExamplesRuijie(config)# ip access-list extended 100
Ruijie(config)# access-list 100 list-remark this acl is to filter the host 192.168.4.12

RelatedCommands

Command

Description
Displays all access lists, including the remarks

show access-lists

for the access lists.

Platform
Description

1.3 access-list remark
Use this command to write a helpful comment (remark) for an entry in a numbered access list. Use

1-8

Command Reference

ACL Commands

the no form of this command to remove the remark.
access-list acl-id remark commentno access-list acl-id remark comment

Parameter
Description

Parameter

Description
Access list number.
Standard IP ACL: 1 to 99, 1300 to 1999.

acl-idExtended IP ACL: 100 to 199. 2000 to 2699.
Extended MAC ACL: 700 to 799.
Extended Expert ACL: 2700 to 2899.

comment

Comment that describes the access list entry.

Defaults

The access list entries have no remarks by default.

Command

Global configuration mode

Mode

Usage Guide

You can use this command to write a helpful comment for an entry in a specified access list. If thespecified access list does not exist, the command will create the access list, then add remarks for theaccess entry.

Configuration

The following example writes a comment for an entry in ACL102.

ExamplesRuijie(config)# access-list 102 remark deny-host-10.1.1.1

RelatedCommands

Command

Description
Displays all access lists, including the remarks

show access-lists

for the access list entries.

Platform
Description

1.4 clear access-list counters
Use this command to clear counters of packets matching the deny entries in ACLs.
clear access-list counters [ acl-id | acl-name ]Parameter
Description

Parameter

Description

acl-idAccess list number

1-9Command Reference

acl-name

ACL Commands

Access list nameDefaults

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to clear the counters of packets matching the deny entries in ACLs.

Configuration

The following example clears the packet matching counter of ACL No. 1:

ExamplesBefore configuration:
Ruijie# show access-lists
ip access-list standard 1
10 deny host 50.1.1.2 (10 matches)
20 permit host 60.1.1.2 (15 matches)(10 packets filtered)

After configuration:
Ruijie# clear access-list counters
Ruijie# show access-lists
ip access-list standard 1
10 deny host 50.1.1.2 (10 matches)
20 permit host 60.1.1.2 (15 matches)

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.5 clear counters access-list
Use this command to clear counters of packets matching ACLs.
clear counters access-list [ acl-id | acl-name ]Parameter
Description

Parameter

Description

acl-idAccess list number

acl-name

Access list nameDefaults

1-10

Command Reference

Command

ACL Commands

Privileged EXEC mode

Mode

Usage Guide

This command is used to clear the counters of packets matching the specified or all ACLs.

Configuration

The following example clears the packet matching counter of ACL No. 2700:

ExamplesRuijie #show access-lists 2700
expert access-list extended 2700
10 permit ip VID 4 host 192.168.3.55 any host 192.168.99.6 any(88 matches)

20 deny tcp any any eq login any any (33455 matches)
30 permit tcp any any host 192.168.6.9 any (10 matches)
Ruijie# clear counters access-list 2700
Ruijie# show access-lists 2700
expert access-list extended 2700
10 permit ip VID 4 host 192.168.3.55 any host 192.168.99.6 any
20 deny tcp any any eq login any any
30 permit tcp any any host 192.168.6.9 any

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.6 deny
One or multiple deny conditions are used to determine whether to forward or discard the packet. In
ACL configuration mode, you can modify the existent ACL or configure according to the protocol
details.
1.

Standard IP ACL[ sn ] deny { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address }[ time-range time-range-name ] [ log ]2.

Extended IP ACL[ sn ] deny protocol { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address }[ eq port | gt port | lt port | neq port | range lower upper ] { destination-ipv4-address
destination-ipv4-wildcard | any | host destination-ipv4-address } [ dscp dscp ] [ fragment ][ precedence precedence ] [ tos tos ] [ eq port | gt port | lt port | neq port | range lower upper ][ match-all tcp-flag | established ] [ time-range time-range-name ] [ log ]Extended IP ACLs of some important protocols:Internet Control Message Protocol (ICMP)[ sn ] deny icmp { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address }{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address }1-11

Command Reference

ACL Commands[ icmp-type ] [ [ icmp-type [ icmp-code ] ] | [ icmp-message ] ] [ dscp dscp ] [ precedence
precedence ] [ tos tos ] [ fragment ] [ time-range time-range-name ]Transmission Control Protocol (TCP)[ sn ] deny tcp { source-ipv4-address source-wildcard | any | host source-ipv4-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } [ eq port | gt port | lt port | neq port | range lower upper ] [ dscp
dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ match-all tcp-flag | established ][ time-range time-range-name ]User Datagram Protocol (UDP)[ sn ] deny udp { source-ipv4-address source-wildcard | any | host source-ipv4-address } [ eq port |gt port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard |any | host destination-ipv4-address } [ eq port | gt port | lt port | neq port | range lower upper ] [ dscp
dscp ] [ precedence precedence] [ tos tos ] [ fragment ] [ time-range time-range-name ]3.

Extended MAC ACL[ sn ] deny { source-mac-address mask | any | host source-mac-address } { destination-mac-address
mask | any | host destination-mac-address } [ ethernet-type ] [ cos [ cos ] [ inner cos ] ] [ time-range
time-range-name ]4.

Extended expert ACL[ sn ] deny [ protocol | [ ethernet-type ] [ cos [ cos ] [ inner cos ] ] ] [ VID [ vid ] [ inner vid ] ]{ source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address } { source-mac-address
mask | any | host source-mac-address } [ eq port | gt port | lt port | neq port | range lower upper ]{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address } { any |host destination-mac-address } [ eq port | gt port | lt port | neq port | range lower upper ] [ dscp
dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ match-all tcp-flag | established ][ time-range time-range-name ]When you select the ethernet-type field or cos field:[ sn ] deny { ethernet-type | cos [ cos ] [ inner cos ] } [ VID [ vid ] [ inner vid ] ] { source-mac-address
mask | any | host source-mac-address } { any | host destination-mac-address } [ time-range
time-range-name ]When you select the protocol field:[ sn ] deny protocol [ VID [ vid ] { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port |neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ match-all tcp-flag | established ] [ time-range time-range-name ]Extended expert ACLs of some important protocols

Internet Control Message Protocol (ICMP)[ sn ] deny icmp[ VID [ vid ] { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address }{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address } { any |host destination-mac-address } [ icmp-type ] [ [ icmp-type [ icmp-code ] ] | [ icmp-message ] ] [ dscp
dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ time-range time-range-name ]Transmission Control Protocol (TCP)

1-12

Command Reference

ACL Commands[ sn ] deny tcp [ VID [ vid ] { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port |neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ match-all tcp-flag | established ] [ time-range time-range-name ]User Datagram Protocol (UDP)[ sn ] deny udp [ VID [ vid ] [ inner vid ] ] { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port |neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ time-range time-range-name ]
5.

ACL80

[ sn ] deny hex hex-mask offset
6.

Extended IPv6 ACL[ sn ] deny ipv6-protocol { any | host source-ipv6-address } [ eq port | gt port | lt port | neq port |range lower upper ] { any | host destination-ipv6-address } [ eq port | gt port | lt port | neq port |range lower upper ] [ dscp dscp ] [ flow-label flow-label ] [ fragment ] [ match-all tcp-flag |established ] [ time-range time-range-name ] [ log ]Extended IPv6 ACLs of some important protocols:
Internet Control Message Protocol (ICMP)[ sn ] deny icmp { any | host source-ipv6-address } { any | host destination-ipv6-address }[ icmp-type ] [ [ icmp-type [ icmp-code ] ] | [ icmp-message ] ] [ dscp dscp ] [ flow-label flow-label ][ fragment ] [ time-range time-range-name ] [ log ]Transmission Control Protocol (TCP)[ sn ] deny tcp { any | host source-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] { any | host destination-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] [ dscp dscp ] [ flow-label flow-label ] [ fragment ] [ match-all tcp-flag | established ][ time-range time-range-name ] [ log ]User Datagram Protocol (UDP)[ sn ] deny udp { any | host source-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] { any | host destination-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] [ dscp dscp ] [ flow-label flow-label ] [ fragment ] [ time-range time-range-name] [ log ]Parameter
Description

Parameter

Description

sn

ACL entry sequence numberdeny

If matched, access is denied.

source-ipv4-address

Specify the source IP address (host address or network address).

source-ipv4-wildcard

It can be discontinuous, for example, 0.255.0.32.
IP protocol number. It can be one of EIGRP, GRE, IPINIP, IGMP,

protocolNOS, OSPF, ICMP, UDP, TCP, and IP. It can also be a number
representing the IP protocol between 0 and 255. The important

1-13

Command Reference

ACL Commands

protocols such as ICMP, TCP, and UDP are described separately.
destination-ipv4-address

destination-ipv4-wildcard

Specify the destination IP address (host address or network
address).
Wildcard of the destination IP address. It can be discontinuous, forexample, 0.255.0.32.

fragment

Packet fragment filtering

dscp

Differentiated service code point

dscp

Code point value, ranging from 0 to 63

precedence

Specify the packet priority.

precedence

Packet precedence value (0 to 7)eq

Equal operator

gt

Greater operator

lt

Smaller operator

neq

Unequal operator

port

Layer4 port number

range

Layer4 port number range of the packet

lower

Lower limit of the layer4 port number

upper

Upper limit of the layer4 port number

tosSpecify type of service

tos

ToS value (0 to 15)

icmp-type

ICMP message type (0 to 255)

icmp-code

ICMP message type code (0 to 255)

icmp-message

ICMP message type namehost source-mac-address

Source physical address

host

Destination physical address

destination-mac-address
cos cos

Match the specified cos field in the outer tag

inner cos

Match the specified cos field in the inner tag

VID vid

Match the specified VLAN ID field in the outer tag

inner vid

Match the specified VLAN ID field in the inner tag

ethernet-type

Ethernet typematch-all

Match all the bits of the TCP flag.

tcp-flagMatch the TCP flag.

established

Match the RST or ACK bits, not other bits of the TCP flag.

prefix-length

Prefix mask length

source-ipv6-address

Source IPv6 address

destination-ipv6-address

Destination IPv6 address

flow-label

Flow label

flow-label

Flow label value, within the range of 0 to 1048575.

ipv6-protocol

For the IPv6, the field can be ipv6 | icmp | tcp | udp and number in therange 0 to 255

time-range

Time range of the packet filteringtime-range-name

Time range name of the packet filtering

1-14

Command Referencelog

Defaults

No entry

Command

ACL configuration mode.

ACL Commands

Logs will be periodically output if packets matching the ACEs are
found

mode

Usage Guide

Use this command to configure the filtering entry of ACLs in ACL configuration mode.

Configuration

The following example shows how to create and display an extended expert ACL. This expert ACL

Examplesdenies all the TCP packets with the source IP address 192.168.4.12 and the source MAC address
001300498272.
Ruijie(config)# expert access-list extended 2702
Ruijie(config-exp-nacl)# deny tcp

host 192.168.4.12 host 0013.0049.8272 any any

Ruijie(config-exp-nacl)# permit any any any any
Ruijie(config-exp-nacl)# show access-lists
expert access-list extended 2702
10 deny tcp host 192.168.4.12 host 0013.0049.8272 any any
20 permit any any any any
Ruijie(config-exp-nacl)#
This example shows how to use the extended IP ACL. The purpose is to deny the host with the IP
address 192.168.4.12 to provide services through the TCP port 100 and apply the ACL to Interface
GigabitEthernet 0/17. The configuration procedure is as below:
Ruijie(config)# ip access-list extended ip-ext-acl
Ruijie(config-ext-nacl)# deny tcp host 192.168.4.12 eq 100 any
Ruijie(config-ext-nacl)# show access-lists
ip access-list extended ip-ext-acl
10 deny tcp host 192.168.4.12 eq 100 any
Ruijie(config-ext-nacl)# exit
Ruijie(config)#interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ip access-group ip-ext-acl inThis example shows how to use the extended MAC ACL. The purpose is to deny the host with the
MAC address 0013.0049.8272 to send Ethernet frames of the type 100 and apply the rule to Interface
GigabitEthernet 0/17. The configuration procedure is as below:
Ruijie(config)# mac access-list extended mac1
Ruijie(config-mac-nacl)# deny host 0013.0049.8272 any aarp
Ruijie(config-mac-nacl)# show access-lists
mac access-list extended mac1
10 deny host 0013.0049.8272 any aarp
Ruijie(config-mac-nacl)# exit
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# mac access-group mac1 inThis example shows how to use the standard IP ACL. The purpose is to deny the host with the IP

1-15

Command Reference

ACL Commands

address 192.168.4.12 and apply the rule to Interface GigabitEthernet 0/1. The configuration
procedure is as below:
Ruijie(config)# ip access-list standard 34
Ruijie(config-ext-nacl)# deny host 192.168.4.12
Ruijie(config-ext-nacl)# show access-lists
ip access-list standard 34
10 deny host 192.168.4.12
Ruijie(config-ext-nacl)# exit
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ip access-group 34 inThis example shows how to use the extended IPv6 ACL. The purpose is to deny the host with the IP
address 192.168.4.12 and apply the rule to Interface GigabitEthernet 0/1. The configuration
procedure is as below:
Ruijie(config)# ipv6 access-list v6-acl
Ruijie(config-ipv6-nacl)# 11 deny ipv6 host 2001::1 any
Ruijie(config-ipv6-nacl)# show access-lists
ipv6 access-list extended v6-acl
11 deny ipv6 host 2001::1 any
Ruijie(config-ipv6-nacl)# exit
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 traffic-filter v6-acl in

RelatedCommands

Platform

Command

Description

show access-lists

Displays all ACLs.

ip access-list

Defines an IP ACL.

mac access-list

Defines an extended MAC ACL.

expert access-list

Defines an extended expert ACL.

ipv6 access-list

Defines an extended IPv6 ACL.

N/A

Description

1.7 expert access-group
Use this command to apply the specified expert access list globally or on the specified interface. Use
the no form of the command to remove the application.
expert access-group { acl-id | acl-name } in
no expert access-group { acl-id | acl-name } inParameter
Description

Parameter

Description

acl-idExpert access list number: 2700 to 2899

acl-name

Name of the expert access list

1-16

Command Referencein

ACL Commands

Specifies filtering on inbound packets.

Defaults

No expert access list is applied globally or on the interface.

Command

Global or interface configuration mode.

mode

Usage Guide

This command is used to apply the specified access list globally or on the interface to control the input
and output data streams. Use the show access-group command to view the setting.

Configuration

The following example shows how to apply the access-list accept_00d0f8xxxxxx only to Gigabit

Examplesinterface 0/17:
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# expert access-group accept_00d0f8xxxxxx_only in

RelatedCommands

Platform

Command

Description

show access-group

Displays the ACL configuration.

N/A

Description

1.8 expert access-list advanced
Use this command to create an advanced expert access list and place the device in expert advanced
access list configuration mode. Use the no form of this command to remove the advanced expert
access list.
expert access-list advanced acl-nameno expert access-list advanced acl-nameParameter
Description

Parameter

Description

acl-name

Name of the advanced expert access list

Defaults

N/A

Command

Global configuration mode

mode

Usage Guide

Use this command to create an advanced expert access list (namely, ACL80) to match your custom
fields.

Configuration

The following example creates an advanced expert access list named adv-acl.

ExamplesRuijie(config)# expert access-list advanced adv-acl

1-17

Command Reference

ACL Commands

Ruijie(config-exp-dacl)# show access-lists
expert access-list advanced adv-acl

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

N/A

Description

1.9 expert access-list counter
Use this command to enable the counter of packets matching the specified expert access list. Use theno form of this command to disable this function.
expert access-list counter { acl-id | acl-name }no expert access-list counter { acl-id | acl-name }Parameter
Description

Parameter

Description

acl-idExpert access list number: 2700 to 2899.

acl-name

Name of the access list.

Defaults

The counter of the packets matching the expert access list is disabled.

Command

Global configuration mode

mode

Usage Guide

Use this command to enable the counter of packets matching the specified expert access list, so thatyou can analyze the counters to learn whether the network is attacked by the illegal packets.

Configuration

The following example enables the counter of packets matching the extended expert access list

Examplesnamed exp-acl:Ruijie(config)# expert access-list counter exp-acl
Ruijie(config)# show access-lists
expert access-list extended exp-acl
10 permit ip VID 4 host 192.168.3.55 any host 192.168.99.6 any (16 matches)
20 deny tcp any any eq login any any (78 matches)

The following example disables the counter of packets matching the extended expert access list
named exp-acl.
Ruijie(config)# no expert access-list counter exp-acl
Ruijie(config)# show access-lists
expert access-list extended 2700

1-18

Command Reference

ACL Commands

10 permit ip VID 4 host 192.168.3.55 any host 192.168.99.6 any
20 deny tcp any any eq login any any

RelatedCommands

Platform
Description

Command

Description

show access-lists

Displays the extended expert ACL.

N/A

1.10 expert access-list extended
Use this command to create an extended expert access list. Use the no form of the command to
remove the ACL.
expert access-list extended { acl-id | acl-name }no expert access-list extended { acl-id | acl-name }Parameter
Description

Parameter

Description

acl-idExtended expert access list number: 2700 to 2899

acl-name

Name of the extended expert access list

Defaults

N/A

Command

Global configuration mode.

mode

Usage Guide

Use the show access-lists command to display the ACL configurations.

Configuration

Create an extended expert ACL named exp-acl:

ExamplesRuijie(config)# expert access-list extended exp-acl
Ruijie(config-exp-nacl)# show access-lists expert access-list extended exp-acl
Ruijie(config-exp-nacl)#
Create an extended expert ACL numbered 2704:
Ruijie(config)# expert access-list extended 2704
Ruijie(config-exp-nacl)# show access-lists access-list extended 2704
Ruijie(config-exp-nacl)#

RelatedCommands

Platform

Command

Description

show access-lists

Displays the extended expert ACLs

N/A

Description

1-19

Command Reference

ACL Commands

1.11 expert access-list new-fragment-mode
Use this command to switch the matching mode of fragmentation packets. Use the no form of thiscommand to restore the default matching mode of fragmentation packets.
expert access-list new-fragment-mode { acl-id | acl-name }no expert access-list new-fragment-mode { acl-id | acl-name }Parameter
Description

Defaults

Parameter

Description

acl-idExpert access list number: 2700 to 2899.

acl-name

Name of the expert access list.

Use the default matching mode of fragmentation packets. By default, if the access rule is tagged withfragment, it will match all packets except for the first fragmentation packet. If the access rule is nottagged with fragment, all packets including the first and all subsequent fragmentation packets will bematched.

Command

Global configuration mode

mode

Usage Guide

Use this command to switch and control the matching mode of access rules to fragmentation packets.

Configuration

The following example switches the matching mode of fragmentation packets for the ACL 2700 from

Examplesthe default mode to a new matching mode:
Ruijie(config)# expert access-list new-fragment-mode 2700

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.12 expert access-list resequence
Use this command to resequence an expert access list. Use the no form of this command to restore
the default order of access entries.
expert access-list resequence { acl-id | acl-name } start-sn inc-sn
no expert access-list resequence { acl-id | acl-name }Parameter
Description

Parameter

Description

acl-idExpert access list number: 2700 to 2899.

1-20

Command Reference

Defaults

ACL Commands

acl-name

Name of the expert access list

start-sn

Start sequence number. Range: 1 to 2147483647

inc-snIncrement of the sequence number. Range: 1 to 2147483647

start-sn: 10
inc-sn: 10

Command

Global configuration mode

mode

Usage Guide

Use this command to change the order of the access entries.

Configuration

The following example resequences entries of expert access list “exp-acl”:

ExamplesBefore the configuration:
Ruijie# show access-lists
expert access-list extended exp-acl
10 permit ip any any any any
20 deny ip any any any any

After the configuration:
Ruijie# config
Ruijie(config)# expert access-list resequence exp-acl 21 43
Ruijie(config)# exit
Ruijie# show access-lists
expert access-list extended exp-acl
21 permit ip any any any any
64 deny ip any any any any

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

N/A

Description

1.13 global access-group
Use this command to apply the global access list on the interface. Use the no form of this command
to remove the global access list from the interface.
global access-groupno global access-group

Parameter
Description

Parameter

Description

1-21

Command Reference

N/A

ACL Commands

N/A

Defaults

By default, the global access list is applied on the interface.

Command

Interface configuration mode

mode

Usage Guide

N/A

Configuration

The following example applies the global access list on interface GigabitEthernet 0/17.

ExamplesRuijie(config)# interface gigaEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# global access-group

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.14 ip access-group
Use this command to apply a specific access list globally or to an interface. Use the no form of thiscommand to remove the access list from the interface.
ip access-group { acl-id | acl-name } in
no ip access-group { acl-id | acl-name } inParameter
Description

Parameteracl-idDescription
IP access list or extended IP access list number:
1 to 199, 1300 to 2699

acl-name

Name of the IP ACL

in

Filters the incoming packets of the interface.

Defaults

No access list is applied globally or on the interface by default.

Command

Global or interface configuration mode.

mode

Usage Guide

Use this command to control access to a specified interface, globally.

Configuration

The following example applies the ACL 120 on interface gigaEthernet 0/17 to filter the incoming

Examplespackets:
Ruijie(config)# interface gigaEthernet 0/17

1-22Command Reference

ACL Commands

Ruijie(config-if-GigabitEthernet 0/17)# ip access-group 120 in

RelatedCommands

Platform

Command

Description

access-list

Defines an ACL.

show access-lists

Displays all ACLs.

N/A

Description

1.15 ip access-list
Use this command to create a standard IP access list or extended IP access list. Use the no form of
the command to remove the access list.
ip access-list { extended | standard } { acl-id | acl-name }no ip access-list { extended | standard } { acl-id | acl-name }Parameter
Description

Parameter

Description
Access list number:

acl-idStandard: 1 to 99, 1300 to 1999;
Extended: 100 to 199, 2000 to 2699.

acl-name

Defaults

N/A

Command

Global configuration mode

Name of the access list

mode

Usage Guide

Configure a standard access list if you need to filter on source address only. If you want to filter onanything other than source address, you need to create an extended access list.
Refer to deny or permit in the two modes. Use the show access-lists command to display the ACL
configurations.

Configuration

The following example creates a standard access list named std-acl.

ExamplesRuijie(config)# ip access-list standard std-acl
Ruijie(config-std-nacl)# show access-lists
ip access-list standard std-acl

The following example creates an extended ACL numbered 123:
Ruijie(config)# ip access-list extended 123
Ruijie(config-ext-nacl)# show access-lists
ip access-list extended 123

1-23

Command Reference

RelatedCommands

Platform

ACL Commands

Command

Description

show access-lists

Displays all ACLs.

N/A

Description

1.16 ip access-list counter
Use this command to enable the counter of packets matching the standard or extended IP access list.
Use the no form of this command to disable the counter.
ip access-list counter { acl-id | acl-name }no ip access-list counter { acl-id | acl-name }Parameter
Description

Parameter

Description
IP access list number:

acl-idStandard IP access list: 1 to 99, 1300 to 1999;
Extended IP access list: 100 to 199, 2000 to 2699.

acl-name

Name of the IP access list.

Defaults

The counter of packets matching the standard or extended IP access list is disabled by default.

Command

Global configuration mode

mode

Usage Guide

N/A

Configuration

The following example enables the counter of packets matching the standard access list:

ExamplesRuijie(config)# ip access-list counter std-acl
Ruijie(config-std-nacl)# show access-lists
ip access-list standard std-acl
10 permit 195.168.6.0 0.0.0.255 (999 matches)
20 deny host 5.5.5.5 time-range tm (2000 matches)

The following example disables the counter of packets matching the standard access list:
Ruijie(config)# no ip access-list counter std-acl
Ruijie(config-std-nacl)# show access-lists
ip access-list standard std-acl
10 permit 195.168.6.0 0.0.0.255
20 deny host 5.5.5.5 time-range tm

RelatedCommands

Command

Description

1-24

Command Reference

ACL Commands

Displays all access lists.

show access-lists

Platform
Description

N/A

1.17 ip access-list log-update interval
Use this command to configure the interval at which the IPv4 access list log is updated. Use the noform of this command to restore the default interval.
ip access-list log-update interval time
no ip access-list log-update intervalParameter
Description

Parameter

Description
For the access rule with the log option, a packet hit is output at theinterval of ACL logging output. The interval ranges from 0 to 1440

time

minutes, and the default value is 5 minutes, indicating that the ACL
matching log of a specified flow is output every 5 minutes. 0 indicatesthat no ACL logging is output.

Defaults

The default interval at which the IPv4 access list log is updated is 5 minutes.

Command

Global configuration mode

mode

Usage Guide

Use this command to configure the interval at which the IPv4 access list log is updated.

Configuration

The following example configures the interval for the IPv4 access list log update to 10 minutes:

ExamplesRuijie# configure terminal
Ruijie(config)# ip access-list log-update interval 10

RelatedCommands

Platform
Description

Command

Description

ip access-list

Defines an IPv4 access list.

N/A

1.18 ip access-list new-fragment-mode
Use this command to switch the matching mode of fragmentation packets of standard or extended IP
access list. Use the no form of this command to restore the default matching mode of fragmentation
packets.
ip access-list new-fragment-mode { acl-id | acl-name }1-25Command Reference

ACL Commands

no ip access-list new-fragment-mode { acl-id | acl-name }Parameter
Description

Parameter

Description
IP access list number:

acl-idStandard IP access list: 1 to 99, 1300 to 1999;
Extended IP access list: 100 to 199, 2000 to 2699.

acl-name

Defaults

Name of the standard or extended IP access list

Use the default matching mode of fragmentation packets. By default, if the access rule is tagged withfragment, it will match all packets except for the first fragmentation packet. If the access rule is nottagged with fragment, all packets including the first and all subsequent fragmentation packets will bematched.

Command

Global configuration mode

mode

Usage Guide

This command is used to switch and control the fragmentation packet matching mode of accessrules.

Configuration

The following example switches the fragmentation packet matching mode of the ACL 100 from the

Examplesdefault mode to a new mode:
Ruijie(config)# ip access-list new-fragment-mode 100

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.19 ip access-list resequence
Use this command to resequence a standard or extended IP access list. Use the no form of thiscommand to restore the default order of access entries.
ip access-list resequence { acl-id | acl-name } start-sn inc-sn
no ip access-list resequence { acl-id | acl-name }Parameter
Description

Parameter

Description
IP access list number:

acl-idStandard IP access list: 1 to 99, 1300 to 1999;
Extended IP access list: 100 to 199, 2000 to 2699.

acl-name

Name of the standard or extended IP access list

1-26

Command Reference

Defaults

ACL Commands

start-sn

Start sequence number. Range: 1 to 2147483647

inc-snIncrement of the sequence number. Range: 1 to 2147483647

start-sn: 10
inc-sn: 10

Command

Global configuration mode

mode

Usage Guide

Use this command to change the order of the access entries.

Configuration

The following example resequences entries of ACL1:ExamplesBefore the configuration:
Ruijie# show access-lists
ip access-list standard 1
10 permit host 192.168.4.12
20 deny any any

After the configuration:
Ruijie# config
Ruijie(config)# ip access-list resequence 1 21 43
Ruijie(config)# exit
Ruijie# show access-lists
ip access-list standard 1
21 permit host 192.168.4.12
64 deny any any

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists..

N/A

Description

1.20 ipv6 access-list
Use this command to create an IPv6 access list and to place the device in IPv6 access list
configuration mode. Use the no form of this command to remove the access list.
ipv6 access-list acl-nameno ipv6 access-list acl-nameParameter
Description

Parameter

Description

acl-name

Name of the IPv6 access list.

1-27

Command Reference

Defaults

N/A

Command

Global configuration mode

ACL Commands

mode

Usage Guide

To filter the IPv6 packets through the access list, you need to define an IPv6 access list by using theipv6 access-list command.

Configuration

The following example creates an IPv6 access list named v6-acl:

ExamplesRuijie(config)# ipv6 access-list v6-acl
Ruijie(config-ipv6-nacl)# show access-lists
ipv6 access-list extended v6-acl

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

N/A

Description

1.21 ipv6 access-list counter
Use this command to enable the counter of packets matching the IPv6 access list. Use the no form of
this command to disable the counter.
ipv6 access-list counter acl-nameno ipv6 access-list counter acl-nameParameter
Description

Parameter

Description

acl-name

Name of the IPv6 access list.

Defaults-

Command

Global configuration mode

mode

Usage Guide

Use this command to enable the counter of packets matching the IPv6 access list to monitor the IPv6
packets matching and filtering.

Configuration

The following example enables the counter of packets matching the IPv6 access list named v6-acl:

ExamplesRuijie(config)# ipv6 access-list counter v6-acl
Ruijie(config)# show access-lists
ipv6 access-list acl-v6

1-28

Command Reference

ACL Commands

10 permit icmp any any (7 matches)
20 deny tcp any any (7 matches)

The following example disables the counter of packets matching the IPv6 access list named v6-acl:Ruijie(config)# no ipv6 access-list counter v6-acl
Ruijie(config-ipv6-nacl)# show access-lists
ipv6 access-list acl-v6
10 permit icmp any any
20 deny tcp any any

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

N/A

Description

1.22 ipv6 access-list log-update interval
Use this command to configure the interval at which the IPv6 access list log is updated. Use the noform of this command to restore the default interval.
ipv6 access-list log-update interval time
no ipv6 access-list log-update intervalParameter
Description

Parameter

Description
For the access rule with the logging option, a packet hit is output at
the interval of ACL logging output. The interval ranges from 0 to 1440

time

minutes, and the default value is 5 minutes, indicating that the ACL
matching log of a specific flow is output every 5 minutes. 0 indicatesthat no ACL logging is output.

Defaults

By default, it is 5 minutes.

Command

Global configuration mode

mode

Usage Guide

Use this command to configure the interval at which the IPv6 access list log is updated.

Configuration

The following example configures the interval for the IPv6 access list log update to 10 minutes:

ExamplesRuijie# configure terminal
Ruijie(config)# ipv6 access-list log-update interval 10

RelatedCommand

Description

1-29

Command Reference

ACL Commands

Commands
Defines an IPv6 access list.

ipv6 access-list

Platform
Description

N/A

1.23 ipv6 access-list resequence
Use this command to resequence an IPv6 access list. Use the no form of this command to restore thedefault order of access entries.
ipv6 access-list resequence acl-name start-sn inc-sn
no ipv6 access-list resequence acl-nameParameter
Description

Defaults

Parameter

Description

acl-name

Name of the IPv6 access list

start-sn

Start sequence number. Range: 1 to 2147483647

inc-snIncrement of the sequence number. Range: 1 to 2147483647

start-sn: 10
inc-sn: 10

Command

Global configuration mode

mode

Usage Guide

Use this command to change the order of the access entries.

Configuration

The following example resequences entries of IPv6 access list “v6-acl”:

ExamplesBefore the configuration:
Ruijie# show access-lists
ipv6 access-list v6-acl
10 permit ipv6 any any
20 deny ipv6 any any

After the configuration:
Ruijie# config
Ruijie(config)# ipv6 access-list resequence v6-acl 21 43
Ruijie(config)# exit
Ruijie# show access-lists
ipv6 access-list v6-acl
21 permit ipv6 any any
64 deny ipv6 any any

RelatedCommand

Description

1-30

Command Reference

ACL Commands

Commands
Displays all access lists.

show access-lists

Platform

N/A

Description

1.24 ipv6 traffic-filter
Use this command to apply an IPv6 access list on the specified interface. Use the no form of thecommand to remove the IPv6 access list from the interface/VXLAN.
ipv6 traffic-filter acl-name in
no ipv6 traffic-filter acl-name in

Parameter
Description

Parameter

Description

acl-name

Name of IPv6 access list

inSpecifies filtering on inbound packets

Defaults

By default, it is not disabled.

Command

Interface configuration mode.

mode

Usage Guide

Use this command to apply the IPv6 access list to a specified interface to filter the inbound oroutbound packets.

Configuration

The following example applies the IPv6 access list named v6-acl to interface GigabitEthernet 0/1:

ExamplesRuijie(config)# interface GigaEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ipv6 traffic-filter v6-acl in

RelatedCommands

Platform

Command

Description

show access-group

Displays ACL configurations on the interface.

N/A

Description

1.25 list-remark
Use this command to write a helpful comment (remark) for an access list. Use the no form of thiscommand to remove the remark.
list-remark comment
no list-remark

1-31

Command Reference

Parameter
Description

ACL Commands

Parameter

Descriptioncomment

Comment that describes the access list.

Defaults

The access lists have no remarks by default.

Command

ACL configuration mode

mode

Usage Guide

You can use this command to write a helpful comment for a specified access list.

Configuration

The following example writes a comment of “this acl is to filter the host 192.168.4.12” for ACL102.

ExamplesRuijie(config)# ip access-list extended 102
Ruijie(config-ext-nacl)# list-remark this acl is to filter the host
192.168.4.12
Ruijie(config-ext-nacl)# show access-lists
ip access-list extended 102
deny ip host 192.168.4.12 any
1000 hits
this acl is to filter the host 192.168.4.12
Ruijie(config-ext-nacl)#

RelatedCommands

Command

Description

show access-lists

Displays all access lists.

ip access-list

Defines an IPv4 access list.
Adds a helpful comment for an access list inaccess-list list remark

Platform

global configuration mode.

N/A

Description

1.26 mac access-group
Use this command to apply the specified MAC access list globally or on the specified interface. Use
the no form of the command to remove the access list from the interface.
mac access-group { acl-id | acl-name } inno mac access-group { acl-id | acl-name } inParameter
Description

Parameter

Description

acl-id

MAC access list number. The range is from 700 to 799.

1-32

Command Reference

ACL Commands

acl-name

Name of the MAC access list

inSpecifies filtering on the inbound packets.

Defaults

No MAC access list is applied by default.

Command

Global or interface configuration mode.

mode

Usage Guide

Use this command to apply the access list globally or to the interface to filter the inbound or outboundpackets based on the MAC address.

Configuration

The following example applies the MAC access-list accept_00d0f8xxxxxx_only to interface

ExamplesGigabitEthernet 0/1:
Ruijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# mac access-group accept_00d0f8xxxxxx_only in

RelatedCommands

Platform

Command

Description

show access-group

Displays the ACL configuration on the interface.

N/A

Description

1.27 mac access-list counter
Use this command to enable the counter of packet matching the extended MAC access list. Use theno form of this command to disable the counter.
mac access-list counter { acl-id | acl-name }no mac access-list counter { acl-id | acl-name }Parameter
Description

Parameter

Description

acl-idExtended MAC access list number. The range is from 700 to 799.

acl-name

Name of the extended MAC access list

Defaults

The counter is disabled by default.

Command

Global configuration mode

mode

Usage Guide

Use this command to enable the counter of packets matching the MAC access list to monitor the
packets matching and filtering.

Configuration

The following example enables the counter of packet matching the extended MAC access list named

Examplesmac-acl:

1-33

Command Reference

ACL Commands

Ruijie(config)# mac access-list counter mac-acl
Ruijie(config)# show access-lists
mac access-list extended mac-acl
10 permit host 0023.56ac.8965 any (170 matches)
20 deny any any etype-any cos 6 (239 matches)

The following example disables the counter of packet matching the extended MAC access list named
mac-acl:Ruijie(config)# no mac access-list counter mac-acl
Ruijie(config)# show access-lists
mac access-list extended mac-acl
10 permit host 0023.56ac.8965 any
20 deny any any etype-any cos 6

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

N/A

Description

1.28 mac access-list extended
Use this command to create an extended MAC access list. Use the no form of the command to
remove the MAC access list.
mac access-list extended { acl-id | acl-name }no mac access-list extended { acl-id | acl-name }Parameter
Description

Parameter

Description

acl-idExtended MAC access list number. The range is from 700 to 799.

acl-name

Name of the extended MAC access list

Defaults

N/A

Command

Global configuration mode.

mode

Usage Guide

To filter the packets based on the MAC address, you need to define a MAC access list by using the
mac access-list extended command.

Configuration

The following command creates an extended MAC access list named mac-acl:

ExamplesRuijie(config)#

mac access-list extended mac-acl

1-34

Command Reference

ACL Commands

Ruijie(config-mac-nacl)# show access-lists
mac access-list extended mac-acl
The following command creates an extended MAC access list numbered 704:
Ruijie(config)# mac access-list extended 704
Ruijie(config-mac-nacl)# show access-lists
mac access-list extended 704

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

N/A

Description

1.29 mac access-list resequence
Use this command to resequence an extended MAC access list. Use the no form of this command torestore the default order of access entries.
mac access-list resequence { acl-id | acl-name } start-sn inc-sn
no mac access-list resequence { acl-id | acl-name }Parameter
Description

Defaults

Parameter

Description

acl-idExtended MAC access list number: 700 to 799.

acl-name

Name of the extended MAC access list

start-sn

Start sequence number. Range: 1 to 2147483647

inc-snIncrement of the sequence number. Range: 1 to 2147483647

start-sn: 10
inc-sn: 10

Command

Global configuration mode

mode

Usage Guide

Use this command to change the order of the access entries.

Configuration

The following example resequences entries of extended MAC access list “mac-acl”:

ExamplesBefore the configuration:
Ruijie# show access-lists
mac access-list extended mac-acl
10 permit any any etype-any
20 deny any any etype-any

After the configuration:

1-35

Command Reference

ACL Commands

Ruijie# config
Ruijie(config)# mac access-list resequence mac-acl 21 43
Ruijie(config)# exit
Ruijie# show access-lists
mac access-list extended mac-acl
21 permit any any etype-any
64 deny any any etype-any

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

N/A

Description

1.30 permit
One or multiple permit conditions are used to determine whether to forward or discard the packet. In
ACL configuration mode, you can modify the existent ACL or configure according to the protocol
details.
1.

Standard IP ACL[ sn ] permit { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address }[ time-range time-range-name ] [ log ]2.

Extended IP ACL[ sn ] permit protocol { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address }[ eq port | gt port | lt port | neq port | range lower upper ] { destination-ipv4-address
destination-ipv4-wildcard | any | host destination-ipv4-address } [ dscp dscp ] [ fragment ][ precedence precedence ] [ tos tos ] [ eq port | gt port | lt port | neq port | range lower upper ][ match-all tcp-flag | established ] [ time-range time-range-name ] [ log ]Extended IP ACLs of some important protocols:
Internet Control Message Protocol (ICMP)[ sn ] permit icmp { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address }{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address }[ icmp-type ] [ [ icmp-type [ icmp-code ] ] | [ icmp-message ] ] [ dscp dscp ] [ precedence
precedence ] [ tos tos ] [ fragment ] [ time-range time-range-name ]Transmission Control Protocol (TCP)[ sn ] permit tcp { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address } [ eqport | gt port | lt port | neq port | range lower upper ] { destination-ipv4-address
destination-ipv4-wildcard | any | host destination-ipv4-address } [ eq port | gt port | lt port | neq port |range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ match-all
tcp-flag | established ] [ time-range time-range-name ]User Datagram Protocol (UDP)

1-36

Command Reference

ACL Commands[ sn ] permit udp { source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address } [ eqport | gt port | lt port | neq port | range lower upper ] { destination-ipv4-address
destination-ipv4-wildcard | any | host destination-ipv4-address } [ eq port | gt port | lt port | neq port |range lower upper ] [ dscp dscp ] [ precedence precedence] [ tos tos ] [ fragment ] [ time-range
time-range-name ]3.

Extended MAC ACL[ sn ] permit { source-mac-address mask | any | host source-mac-address }{ destination-mac-address mask | any | host destination-mac-address } [ ethernet-type ] [ cos [ cos ][ inner cos ] ] [ time-range time-range-name ]4.

Extended expert ACL[ sn ] permit [ protocol | [ ethernet-type ] [ cos [ cos ] [ inner cos ] ] ] [ VID [ vid ] [ inner vid ] ]{ source-ipv4-address source-ipv4-wildcard | any | host source-ipv4-address } { source-mac-address
mask | any | host source-mac-address } [ eq port | gt port | lt port | neq port | range lower upper ]{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address } { any |host destination-mac-address } [ eq port | gt port | lt port | neq port | range lower upper ] [ dscp
dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ match-all tcp-flag | established ][ time-range time-range-name ]When you select the Ethernet-type field or cos field:[ sn ] permit { ethernet-type | cos [ cos ] [ inner cos ] } [ VID [ vid ] [ inner vid ] ] { source-mac-address
mask | any | host source-mac-address } { any | host destination-mac-address } [ time-range
time-range-name ]When you select the protocol field:[ sn ] permit protocol [ VID [ vid ] [ inner vid ] ] { source-ipv4-address source-ipv4-wildcard | any |host source-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port |gt port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard |any | host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port
| neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ match-all tcp-flag | established ] [ time-range time-range-name ]Extended expert ACLs of some important protocols:
Internet Control Message Protocol (ICMP)[ sn ] permit icmp [ VID [ vid ] [ inner vid ] ] { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address }{ destination-ipv4-address destination-ipv4-wildcard | any | host destination-ipv4-address } { any |host destination-mac-address } [ icmp-type ] [ [ icmp-type [ icmp-code ] ] | [ icmp-message ] ] [ dscp
dscp ] [ precedence precedence ] [ tos tos ] [ fragment ] [ time-range time-range-name ]Transmission Control Protocol (TCP)[ sn ] permit tcp [ VID [ vid ] [ inner vid ] ] { source-ipv4-address source-ipv4-wildcard | any | hostsource-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port |neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ match-all tcp-flag | established ] [ time-range time-range-name ]User Datagram Protocol (UDP)[ sn ] permit udp [ VID [ vid ] [ inner vid ] ] { source-ipv4-address source-ipv4-wildcard | any | host

1-37

Command Reference

ACL Commands

source-ipv4-address } { source-mac-address mask | any | host source-mac-address } [ eq port | gt
port | lt port | neq port | range lower upper ] { destination-ipv4-address destination-ipv4-wildcard | any| host destination-ipv4-address } { any | host destination-mac-address } [ eq port | gt port | lt port |neq port | range lower upper ] [ dscp dscp ] [ precedence precedence ] [ tos tos ] [ fragment ][ time-range time-range-name ]
5.

ACL80

[ sn ] permit hex hex-mask offset
6.

Extended IPv6 ACL[ sn ] permit ipv6-protocol { any | host source-ipv6-address } [ eq port | gt port | lt port | neq port |range lower upper ] { any | host destination-ipv6-address } [ eq port | gt port | lt port | neq port |range lower upper ] [ dscp dscp ] [ flow-label flow-label ] [ fragment ] [ match-all tcp-flag |established ] [ time-range time-range-name ] [ log ]Extended IPv6 ACLs of some important protocols:
Internet Control Message Protocol (ICMP)[ sn ] permit icmp { any | host source-ipv6-address } { any | host destination-ipv6-address }[ icmp-type ] [ [ icmp-type [ icmp-code ] ] | [ icmp-message ] ] [ dscp dscp ] [ flow-label flow-label ][ fragment ] [ time-range time-range-name ] [ log ]Transmission Control Protocol (TCP)[ sn ] permit tcp { any | host source-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] { any | host destination-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] [ dscp dscp ] [ flow-label flow-label ] [ fragment ] [ match-all tcp-flag | established ][ time-range time-range-name ] [ log ]User Datagram Protocol (UDP)[ sn ] permit udp { any | host source-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] { any | host destination-ipv6-address } [ eq port | gt port | lt port | neq port | range lower
upper ] [ dscp dscp ] [ flow-label flow-label ] [ fragment ] [ time-range time-range-name] [ log ]Parameter
Description

Parameter

Description

sn

ACL entry sequence number

permitIf matched, access is permit

source-ipv4-address

Specify the source IP address (host address or network address)

source-ipv4-wildcard

It can be discontinuous, for example, 0.255.0.32
IP protocol number. It can be one of EIGRP, GRE, IPINIP, IGMP,

protocolNOS, OSPF, ICMP, UDP, TCP, and IP. It can also be a number
representing the IP protocol between 0 and 255. The important
protocols such as ICMP, TCP, and UDP are described separately

destination-ipv4-address
destination-ipv4-wildcard

Specify the destination IP address (host address or network address)
Wildcard of the destination IP address. It can be discontinuous, forexample, 0.255.0.32

fragment

Packet fragment filtering

dscp

Differentiated service code point

dscp

Code point value, ranging from 0 to 63

precedence

Specify the packet priority

1-38

Command Reference

ACL Commands

precedence

Packet precedence value (0 to 7)eq

Equal operator

gt

Greater operator

lt

Smaller operator

neq

Unequal operator

port

Layer4 port number

range

Layer4 port number range of the packet

lower

Lower limit of the layer4 port number

upper

Upper limit of the layer4 port number

tosSpecify type of service

tos

ToS value (0 to 15)

icmp-type

ICMP message type (0 to 255)

icmp-code

ICMP message type code (0 to 255)

icmp-message

ICMP message type namehost source-mac-address

Source physical address

host

Destination physical address

destination-mac-address
cos cos

Match the specified cos field in the outer tag

inner cos

Match the specified cos field in the inner tag

VID vid

Match the specified VLAN ID field in the outer tag

inner vid

Match the specified VLAN ID field in the inner tag

ethernet-type

Ethernet typematch-all

Match all the bits of the TCP flag.

tcp-flagMatch the TCP flag.

established

Match the RST or ACK bits, not other bits of the TCP flag

prefix-length

Prefix mask length

source-ipv6-address

Source IPv6 address

destination-ipv6-address

Destination IPv6 address

flow-label

Flow label

flow-label

Flow label value, within the range of 0 to 1048575

ipv6-protocol

For the IPv6, the field can be ipv6 | icmp | tcp | udp and number in therange 0 to 255

time-range

Time range of the packet filteringtime-range-name

Time range name of the packet filteringlog

Defaults

N/A

Command

ACL configuration mode.

Logs will be periodically output if packets matching the ACEs are
found

mode

Usage Guide

Use this command to configure the permit conditions for the ACL in ACL configuration mode.

1-39

Command Reference

ACL Commands

Configuration

The following example shows how to create and display an Expert Extended ACL. This expert ACL

Examplespermits all the TCP packets with the source IP address 192.168.4.12 and the source MAC address
001300498272.
Ruijie(config)# expert access-list extended exp-acl
Ruijie(config-exp-nacl)# permit tcp

host

192.168.4.12 host 0013.0049.8272 any any

Ruijie(config-exp-nacl)# deny any any any any
Ruijie(config-exp-nacl)# show access-lists
expert access-list extended exp-acl
10 permit tcp host 192.168.4.12 host 0013.0049.8272 any any
20 deny any any any any
This example shows how to use the extended IP ACL. The purpose is to permit the host with the IP
address 192.168.4.12 to provide services through the TCP port 100 and apply the ACL to interface
GigabitEthernet 0/1. The configuration procedure is as below:
Ruijie(config)# ip access-list extended 102
Ruijie(config-ext-nacl)# permit tcp host 192.168.4.12 eq 100 any
Ruijie(config-ext-nacl)# show access-lists
ip access-list extended 102
10 permit tcp host 192.168.4.12 eq 100 any
Ruijie(config-ext-nacl)#exit
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip access-group 102 inThis example shows how to use the extended MAC ACL. The purpose is to permit the host with the
MAC address 0013.0049.8272 to send Ethernet frames through the type 100 and apply the ACL tointerface GigabitEthernet 0/1. The configuration procedure is as below:
Ruijie(config)# mac access-list extended 702
Ruijie(config-mac-nacl)# permit host 0013.0049.8272 any aarp
Ruijie(config-mac-nacl)# show access-lists
mac access-list extended 702
10 permit host 0013.0049.8272 any aarp 702
Ruijie(config-mac-nacl)# exit
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# mac access-group 702 inThis example shows how to use the standard IP ACL. The purpose is to permit the host with the IP
address 192.168.4.12 and apply the ACL to interface GigabitEthernet 0/1. The configuration
procedure is as below:
Ruijie(config)# ip access-list standard std-acl
Ruijie(config-std-nacl)# permit host 192.168.4.12
Ruijie(config-std-nacl)# show access-lists
ip access-list standard std-acl
10 permit host 192.168.4.12
Ruijie(config-std-nacl)# exit
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip access-group std-acl in

1-40

Command Reference

ACL Commands

This example shows how to use the extended IPv6 ACL. The purpose is to permit the host with the IP
address 192.168.4.12 and apply the ACL to interface GigabitEthernet 0/1. The configuration
procedure is as below:
Ruijie(config)# ipv6 access-list extended v6-acl
Ruijie(config-ipv6-nacl)# 11 permit ipv6 host ::192.168.4.12 any
Ruijie(config-ipv6-nacl)# show access-lists
ipv6 access-list extended v6-acl
11 permit ipv6 host ::192.168.4.12 any
Ruijie(config-ipv6-nacl)# exit
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)#ipv6 traffic-filter v6-acl in

RelatedCommands

Platform

Command

Description

show access-lists

Displays all access lists.

ip access-list

Defines an IP access list.

mac access-list

Defines an extended MAC access list.

expert access-list

Define an extended expert access list.

ipv6 access-list

Defines an extended IPv6 access list.

N/A

Description

1.31 redirect destination interface
Use this command to redirect the traffic matching the access list to the specified interface. Use the noform of this command to remove the redirection.
redirect destination interface interface-name acl { acl-id | acl-name } inno redirect destination interface interface-name acl { acl-id | acl-name } inParameter
Description

Parameter

Description

interface-name

Redirect interface

acl-idAccess list number

acl-name

Access list nameDefaults

No redirection is configured.

Command

Interface configuration mode

mode

Usage Guide

Use this command to configure access redirection, namely, to redirect the traffic matching the accesslist to the specified interface. You can monitor the operation of a specified access list by using this1-41

Command Reference

ACL Commands

command.

Configuration

The following example configures access redirection.

ExamplesRuijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# redirect destination interface
gigabitEthernet 0/18 acl 1 inRelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.32 remark
Use this command to write a helpful comment (remark) for an entry in the access list. Use the no formof this command to remove the remark.
remark comment
no remarkParameter
Description

Parameter

Descriptioncomment

Comment that describes the access entry.

Defaults

The access entries have no remarks.

Command

ACL configuration mode.

mode

Usage Guide

Use this command to write a helpful comment for an access entry.
Up to 100 characters are allowed in the remark.
Two identical access entry remarks in one access list is not allowed.
Removing an access entry may delete the remark for it as well.

Configuration

The following example writes remarks for the entry in extended IP access list 102.

ExamplesRuijie(config)# ip access-list extended 102
Ruijie(config-ext-nacl)# remark first_remark
Ruijie(config-ext-nacl)# permit tcp 1.1.1.1 0.0.0.0 2.2.2.2 0.0.0.0
Ruijie(config-ext-nacl)# remark second_remark
Ruijie(config-ext-nacl)# permit tcp 3.3.3.3 0.0.0.0 4.4.4.4 0.0.0.0
Ruijie(config-ext-nacl)# end
Ruijie#1-42Command Reference

RelatedCommands

Platform

ACL Commands

Command

Description

show access-lists

Displays all access lists.

ip access-list

Defines an IP access list.

N/A

Description

1.33 show access-group
Use this command to display the access list applied to the interface.
show access-group [ interface interface-name ]Parameter
Description

CommandParameter

Description

interface-name

Interface namePrivileged EXEC mode

mode

Usage Guide

Use this command to display the access list configuration on the specified interface. If no interface is
specified, access list configuration on all interfaces is displayed.

Configuration

Ruijie# show access-group interface GigabitEthernet 0/17

Examples

ip access-list extended 101
Applied On interface GigabitEthernet 0/17 in.

RelatedCommands

Platform

Command

Description

ip access-group

Applies the IP access list to the interface.

mac access-group

Applies the MAC access list to the interface.

expert access-group

Applies the expert access list to the interface.

ipv6 traffic-filter

Applies the IPv6 access list to the interface.

N/A

Description

1.34 show access-lists
Use this command to display all access lists or the specified access list.
show access-lists [ acl-id | acl-name ] [ summary ]Parameter

Parameter

Description

1-43

Command Reference

ACL Commands

Description

Commandacl-idAccess list number

acl-name

Name of the IP access list

summary

Access list summary

Global configuration mode

mode

Usage Guide

Use this command to display the specified access list. If no access list number or name is specified, all
the access lists are displayed.

Configuration

Ruijie# show access-lists n_acl

Examples

ip access-list standard n_acl
Ruijie# show access-lists 102
ip access-list extended 102
Ruijie# show access-lists
ip access-list standard n_acl
ip access-list extended 101
permit icmp host 192.168.1.1 any log (1080 matches)
permit tcp host 1.1.1.1 any establisheddeny ip any any (80021 matches)
mac access-list extended mac-acl
expert access-list extended exp-acl
ipv6 access-list extended v6-acl
petmit ipv6 ::192.168.4.12 any (100 matches)deny any any (9 matches)

RelatedCommands

Platform

Command

Description

ip access-list

Defines an IP access list.

mac access-list

Defines an extended MAC access list.

expert access-list

Defines an extended expert access list.

ipv6 access-list

Defines an extended IPv6 access list.

N/A

Description

1.35 show expert access-group
Use this command to display the expert access list applied to the interface.
show expert access-group [ interface interface-name ]1-44Command Reference

Parameter
Description

Command

ACL Commands

Parameter

Description

interface-name

Interface namePrivileged EXEC mode

mode

Usage Guide

Use this command to display the expert access list configured on the interface. If no interface is
specified, the expert access lists on all interfaces are displayed.

Configuration

Ruijie# show expert access-group interface gigabitethernet 0/17

Examplesexpert access-group ee inApplied On interface GigabitEthernet 0/17.

RelatedCommands

Platform

Command

Description

expert access-list

Defines an extended expert access list.

N/A

Description

1.36 show ip access-group
Use this command to display the standard and extended IP access lists on the interface.
show ip access-group [ interface interface-name ]Parameter
Description

CommandParameter

Description

interface-name

Interface namePrivileged EXEC mode

mode

Usage Guide

Use this command to display the standard and extended IP access lists configured on the interface. If
no interface is specified, the standard and extended IP access lists on all interfaces are displayed.

Configuration

Ruijie# show ip access-group interface gigabitethernet 0/17

Examples

ip access-group aaa in
Applied On interface GigabitEthernet 0/17.

RelatedCommands

Command

Description

ip access-list

Defines an IP access list.

1-45

Command Reference

Platform

ACL Commands

N/A

Description

1.37 show ipv6 traffic-filter
Use this command to display the IPv6 access list on the interface.
show ipv6 traffic-filter [ interface interface-name ]Parameter
Description

Parameter

Description

interface-name

Interface nameDefaults-

CommandPrivileged EXEC mode

mode

Usage Guide

Use this command to display the IPv6 access list configured on the interface. If no interface is
specified, the IPv6 access lists on all interfaces are displayed.

Configuration

Ruijie# show ipv6 traffic-filter interface gigabitethernet 0/17

Examples

ipv6 access-group v6 inApplied On interface GigabitEthernet 0/17.

RelatedCommands

Platform

Command

Description

ipv6 access-list

Defines an IPv6 access list.

N/A

Description

1.38 show mac access-group
Use this command to display the MAC access list on the interface.
show mac access-group [ interface interface-name ]Parameter
Description

Defaults

Parameter

Description

interface-name

Interface name

N/A

1-46

Command Reference

Command

ACL Commands

Privileged EXEC mode

mode

Usage Guide

Use this command to display the MAC access list configured on the interface. If no interface is
specified, the MAC access lists on all interfaces are displayed.

Configuration

Ruijie# show mac access-group interface gigabitethernet 0/17

Examplesmac access-group mm in
Applied On interface GigabitEthernet 0/17.

RelatedCommands

Platform

Command

Description

mac access-list

Defines a MAC access list.

N/A

Description

1.39 show redirect interface
Use this command to display the access redirection configuration.
show redirect [ interface interface-name ]Parameter
Description

Parameter

Description

interface-name

Interface nameDefaults

N/A

CommandPrivileged EXEC mode

mode

Usage Guide

Use this command to display the access redirection configuration on the interface. If no interface is
specified, the access redirection configuration on all interfaces is displayed.

Configuration

The following example displays the access redirection configuration on interface GigabitEthernet

Examples0/17.
Ruijie #show redirect interface gigabitEthernet 0/17
acl redirect configuration on interface gigabitEthernet 0/17
redirect destination interface gigabitEthernet 0/17 acl 1 inRelatedCommands

Command

Description

N/A

N/A

1-47

Command Reference

Platform

ACL Commands

N/A

Description

1-48

Command Reference

QoS Commands

2 QoS Commands
2.1 class
Use this command to add reference to an existing class map. Use the no form of this command to
remove the class from the policy map.
class class-map-nameno class class-map-nameParameter

Parameter

Description

Description

class-map-name

Reference to a class map.

Defaults

The function is disabled by default.

Command

Policy configuration mode

Mode

Usage Guide

N/A

Configuration

The following example adds reference to the class map named cmap1.

ExamplesRuijie(config)# class-map cmap1
Ruijie(config-cmap)# match ip dscp 5
Ruijie(config-cmap)# exit
Ruijie(config)# policy-map pmap1
Ruijie(config-pmap)# class cmap1
Ruijie(config-pmap-c)# end

RelatedCommands

Platform

Command

Description

show policy-map

Displays the policy map.

N/A

Description

2.2 class map
Use this command to create a class map and enter class-map configuration mode. Use the no or
default form of this command to remove a class map.
class-map class-map-nameno class-map class-map-namedefault class-map class-map-name2-1

Command Reference

QoS Commands

Parameter

Parameter

Description

Description

class-map-nameClass map name. The class map name can be a
maximum of 31 characters.

Defaults

None

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example creates a class map named cm_acl to match an access list named me.

ExamplesRuijie(config)# mac access-list extended me
Ruijie(config-ext-macl)# permit host 1111.2222.3333 any
Ruijie(config-ext-macl)# exit
Ruijie(config)# class-map cm_acl
Ruijie(config-cmap)# match access-group me
Ruijie(config-cmap)# exit

The following example creates a class map named cm_dscp to match DHCP 8, 16 and 24.
Ruijie(config)# class-map cm_dscp
Ruijie(config-cmap)# match ip dscp 8 16 24
Ruijie(config-cmap)# exit

RelatedCommand

Description

Commands

show class-map

Displays the class map.

Platform

N/A

Description

2.3 match
Use this command to define a match criteria in class map configuration mode. Use the no form of thiscommand to remove the match criteria.
match { access-group { acl-id | acl-name } | ip { dscp dscp-vlaue-list | precedence pre-vlaue-list } }no match { access-group { acl-id | acl-name } | ip { dscp dscp-vlaue-list | precedence
pre-vlaue-list } }Parameter

Parameter

Description

Description

access-group acl-id

Identifies a numbered access list as the match criteria.

access-group acl-nameIdentifies a named access list as the match criteria.

ip dscp dscp-vlaue-list

Identifies DSCP values as the match criteria. Multiple DSCP can be

2-2Command Reference

QoS Commands

configured. The range is from 0 to 63.
ip precedence pre-vlaue-list

Identifies IP precedence values as the match criteria. Multiple IP
precedence can be configured. The range is from 0 to 7.

Defaults

None

CommandClass map configuration mode

Mode

Usage Guide

N/A

Configuration

The following example creates a class map named cmap1 to match DSCP 20, 22, 24 and 30.

ExamplesRuijie(config)# class-map cmap1
Ruijie(config-cmap)# match ip dscp 20 22 24 30

RelatedCommands

Platform

Command

Description

show class-map

Displays the class map.

N/A

Description

2.4 mls qos cos
Use this command to configure the CoS value of an interface. Use the no form of this command torestore the default setting.
mls qos cos default-cos
no mls qos cos

Parameter

Parameter

Description

Description

default-cos

CoS value of the interface. The range is from 0 to 7.

Defaults

The default CoS value is 0.

Command

Interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example configures the default CoS value to 7.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# mls qos cos 7

RelatedCommand

Description

2-3

Command Reference

Commands

show mls qos interface

Platform

N/A

QoS Commands

Displays information of the specified interface.

Description

2.5 mls qos map cos-dscp
Use this command to map the CoS value to the DSCP value. Use the no or default form of thiscommand to restore the default CoS-DSCP mapping.
mls qos map cos-dscp dscp1 … dscp8
no mls qos map cos-dscp
default mls qos map cos-dscp

Parameter

Parameter

Description

Description

dscp1 … dscp8

Specifies the DSCP value. The range is from 0 to 63.

Defaults

By default, the CoS 0, 1, 2, 3, 4, 5, 6, 7 is mapped to the DSCP 0, 8, 16, 24, 32, 40, 48, 56
respectively.

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

Ruijie(config)# mls qo map cos-dscp 8 10 16 18 24 26 32 34

ExamplesRelatedCommand

Description

Commands

show mls qos maps

Displays the CoS-DSCP mapping.

cos-dscp

Platform

N/A

Description

2.6 mls qos map dscp-cos
Use this command to map the DSCP value to the CoS value. Use the no or default form of thiscommand to restore the default DSCP-CoS mapping.
mls qos map dscp-cos dscp-list to cos
no mls qos map dscp-cos
default mls qos map dscp-cos

Parameter

Parameter

Description

2-4

Command Reference

Description

Defaults

Command

QoS Commands

dscp-list

DSCP list. The range is from 0 to 63.

cos

CoS value. The range is from 0 to 7.

The default DSCP-CoS mapping is listed below:
DSCP

DSCP

DSCP

DSCP

DSCP

DSCP

DSCP

DSCP

0-7

8-15

16-23

24-31

32-39

40-47

48-55

56-63

CoS 0

CoS 1

CoS 2

CoS 3

CoS 4

CoS 5

CoS 6

CoS 7

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

Ruijie(config)# mls qos map dscp-cos 8 10 16 18 to 0

ExamplesRelatedCommand

Description

Commands

show mls qos maps

Displays the DSCP-CoS mapping.

dscp-cos

Platform

N/A

Description

2.7 mls qos map ip-precedence-dscp
Use this command to map the IP precedence to the DSCP value. Use the no or default form of thiscommand to restore the default IP-precedence to DSCP mapping.
mls qos map ip-precedence-dscp dscp1 … dscp8
no mls qos map ip-precedence-dscp
default mls qos map ip-precedence-dscp

Parameter

Parameter

Description

Description

dscp1 … dscp8

DSCP list. The range is from 0 to 63.

Defaults

By default, the IP precedence 0, 1, 2, 3, 4, 5, 6, 7 is mapped to the DSCP 0, 8, 16, 24, 32, 40, 48, 56
respectively.

Command

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

Ruijie(config)# mls qos map ip-precedence-dscp 8 10 16 18 24 26 32 34

2-5

Command Reference

QoS Commands

ExamplesRelatedCommand

Description

Commands

show mls qos maps

Displays the IP-precedence to DSCP mapping.

ip-pre-dscp

Platform

N/A

Description

2.8 mls qos scheduler
Use this command to configure the output queue scheduling. Use the no or default form of thiscommand to restore the default scheduler.
mls qos scheduler { sp | wrr | wfq }no mls qos scheduler

Parameter

Parameter

Description

Description

sp

Specifies the absolute priority scheduling.

wrr

Specifies the frame count weighted round-robin scheduling.

wfq

Specifies the weighted fair queuing.

Defaults

The default queue scheduling is wrr.

Command

Global configuration mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example specifies the sp scheduling.

ExamplesRuijie(config)# mls qos scheduler sp
Ruijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# mls qos scheduler wrr

RelatedCommand

Description

Commands

show mls qos scheduler

Displays the output queue scheduling.

Platform

N/A

Description

2.9 mls qos trust
Use this command to configure the trust mode on an interface. Use the no or default form of this2-6

Command Reference

QoS Commands

command to restore the default setting.
mls qos trust { cos | dscp | ip-precedence }no mls qos trust
default mls qos trust

Parameter

Parameter

Description

DescriptioncosSpecifies the CoS trust mode.

dscp

Specifies the DSCP trust mode.

ip-precedence

Specifies the IP-PRE trust mode.

Defaults

No trust mode is configured by default.

Command

Interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example configures the CoS trust mode.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# mls qos trust cos

RelatedCommand

Description

Commands

show mls qos interface

Displays the specified interface configuration.

Platform

N/A

Description

2.10 police
Use this command to configure traffic policing for a class map in a policy map. Use the no form of thiscommand to remove traffic policing for the class map.
police rate-bps burst-byte [ exceed-action { drop | dscp new-dscp | cos new-cos [ none-tos ] } ]no police

Parameter
Description

Parameterrate-bps
burst-byte
drop

Description
Bandwidth limit value per second in KBits. This value range is from 16
to 10000000.
Burst traffic limit value in KBytes. This value range is from 1 to 8192.
Drops the packet. This is available only when the packet exceeds the
bandwidth limit.
Modifies the DSCP value of the packet. This is available only when

dscp new-dscp

the packet exceeds bandwidth limit. The DSCP value range is from 0
to 63.

2-7

Command Referencecos new-cos
none-tos

QoS Commands

Modifies the CoS value of the packet. This is available only when thepacket exceeds bandwidth limit. The CoS value range is from 0 to 7.
Modifies the CoS value only.

Defaults

No traffic policing is configured for the class map by default.

Command

Policy map class configuration mode

Mode

Usage Guide

N/A

Configuration

The following example configures traffic policing which modifies the DSCP value of the packet to 16

Examplesfor class map “cm-acl” in policy map “pmap1”.
Ruijie(config)# policy-map pmap1
Ruijie(config-pmap)# class cm-acl
Ruijie(config-pmap-c)# police 102400 4096 exceed-action dscp 16

RelatedCommand

Description

Commands

show policy-map

Displays the policy map configuration.

Platform

N/A

Description

2.11 policy map
Use the following command to create a policy map and enter policy map configuration mode. Use theno or default form of this command to remove the specified policy map.
policy-map policy-map-nameno policy-map policy-map-namedefault policy-map policy-map-nameParameter
Description

Parameter
policy-map-name

Description
Policy map name. The policy map name can be a maximum of 31
characters.

Defaults

No policy map is configured by default.

Command

Global configuration mode.

Mode

Usage Guide

N/A

2-8

Command Reference

QoS Commands

Configuration

The following example creates policy map “po”, and then adds a reference to class map “cmap1”.

Examples

Sets the rate limit value to 10 Mbps, the burst traffic limit value to 256 Kbps, and discard packets
which exceed the limit.
Ruijie(config)# policy-map po
Ruijie(config-pmap)# class cmapl
Ruijie(config-pmap-c)# police 10240 256 exceed-action drop

RelatedCommand

Description

Commands

show policy-map

Displays the policy map configuration.

Platform

N/A

Description

2.12 priority-queue
Use this command to configure the output queue scheduling policy to SP. Use the no or default formof this command to restore the default queue scheduling policy.
priority-queue
no priority-queue

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The default output queue scheduling policy is WRR.

Command

Global configuration mode.

Mode

Usage Guide

This command shares the same configuration with the mls qos scheduler sp. The show run
command displays this configuration in the mls qos scheduler sp item instead of priority-queue.

Configuration

The following example configures the output queue scheduling policy to SP.

ExamplesRuijie(config)# priority-queue

RelatedCommand

Description

Commands

show mls qos scheduler

Displays the output queue scheduling policy.

Platform

N/A

Description

2.13 priority-queue cos-map
Use this command to configure the mapping between the CoS value and the queue ID. Use the no or

2-9

Command Reference

QoS Commands

default form of this command to restore the default CoS mapping to the queue.
priority-queue cos-map qid cos0 [ cos1 [ cos2 [ cos3 [ cos4 [ cos5 [ cos6 [ cos7 ] ] ] ] ] ] ]no priority-queue cos-map
default priority-queue cos-map

Parameter

Parameter

Description

Description

qid

Queue ID. The range is from 1 to 8.

cos0 ... cos7

CoS value. The range is from 0 to 7.

Defaults

Command

The default mapping between the CoS value and the queue ID is listed below:
Queue 1

Queue 2

Queue 3

Queue 4

Queue 5

Queue 6

Queue 7

Queue 8

CoS 0

CoS 1

CoS 2

CoS 3

CoS 4

CoS 5

CoS 6

CoS 7

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example maps the CoS 3, 5 to the output queue 1.

ExamplesRuijie(config)# priority-queue cos-map 1 3 5RelatedCommand

Description

Commands

show mls qos queuing

Displays the output queues.

Platform

N/A

Description

2.14 qos queue
Use this command to configure a minimum or maximum of the interface bandwidth to a queue. Use
the no or default form of this command to remove the minimum or maximum of the interface
bandwidth.
qos queue queue-id bandwidth { minimum | maximum } bandwidth
no qos queue queue-id bandwidth { minimum | maximum }default qos queue queue-id bandwidth { minimum | maximum }Parameter

Parameter

Description

Description

queue-id

Queue ID. The range is from 1 to 8.

bandwidth

The minimum of the interface bandwidth value per second in KBits. The value

minimumrange is from 16 to 1000000.

bandwidth
bandwidth

The maximum of the interface bandwidth value per second in KBits. The value

maximumrange is from 16 to 1000000.

2-10Command Reference

QoS Commands

bandwidth

Defaults

No minimum or maximum of interface bandwidth to a queue is configured by default.

Command

Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example configures the minimum interface bandwidth of queue 1 to 5 Mbps, and the

Examplesmaximum to 10 Mbps.
Ruijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# qos queue 1 bandwidth maximum 10240
Ruijie(config-if-GigabitEthernet 0/17)# qos queue 1 bandwidth minimum 5120

The following example configures the minimum interface bandwidth of queue 2 to 2 Mbps.
Ruijie(config)# interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/17)# qos queue 2 bandwidth minimum 2048

RelatedCommand

Description

Commands

show qos bandwidth

Displays the interface bandwidth of the queue.

Platform

N/A

Description

2.15 rate-limit
Use this command to configure rate limiting on the interface. Use the no or default form of thiscommand to remove rate limiting from the interface.
rate-limit { input | output } { bps | mbps } burst-sizeno rate-limit { input | output }default rate-limit { input | output }Parameter

Parameter

Description

Description

input

Configures input rate limiting.

outputConfigures output rate limiting.

bps

Bandwidth limit value per second in KBits. This value is from 16 to
1000000.

mbps

Bandwidth limit value per second in Mbits on G.hn port. This value isfrom 10 to 1999

burst-size

Defaults

Burst traffic limit value in KBytes. This value is from 1 to 32.

Rate limiting is not configured by default.

2-11Command Reference

Command

QoS Commands

Interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example configures the rate limit value to 10 Mbps, and the burst traffic limit value to 32

Examples

Kbps.
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# rate-limit input 10240 32

RelatedCommand

Description

Commands

show mls qos rate-limit

Displays the rate limiting configuration of theinterface.

Platform

N/A

Description

2.16 service-policy
Use this command to apply the policy map to the interface, the virtual group or globally. Use the no or
default form of this command to remove the policy map.
service-policy input policy-map-nameno service-policy input policy-map-namedefault service-policy input policy-map-nameParameter

Parameter

Description

Description

policy-map-name

Policy map nameinput

Applies the policy map to the input direction.

Defaults

No policy map is configured on the interface or virtual group by default.

Command

Interface configuration mode, and virtual group configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example applies policy map “po” to the input direction of interface GigabitEthernet 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# service-policy input po

RelatedCommand

Description

Commands

show mls qos interface policers

Displays the policy map configuration on the interface.

show mls qos virtual-group

Displays the policy map configuration on the virtual group.

2-12Command Reference

QoS Commands

policers

Platform

N/A

Description

2.17 set
Use this command to configure the CoS, DSCP or VID value for the traffic. Use the no form of thiscommand to remove the CoS, DSCP or VID value from the traffic.
set { ip dscp new-dscp | cos new-cos | vid new-vid }no set { ip dscp | cos | vid }Parameter

Parameter

Description

Description

ip dscp new-dscp

Configures the DSCP value for the traffic. The range is from 0 to 63.

cos new-cos

Configures the CoS value for the traffic. The range is from 0 to 7.

vid new-vid

Configures the VID value for the traffic. The range is from 1 to 4094.

Defaults

No CoS, DSCP or VID value is configured for the traffic in policy map class mode.

Command

Policy map class configuration mode

Mode

Usage Guide

N/A

Configuration

The following example creates policy map “pmap1”, and adds a reference to class map “cmap1”.

ExamplesRuijie(config)# policy-map pmap1
Ruijie(config-pmap)# class cmap1
The following example modifies the CoS value of the traffic to 3.
Ruijie(config-pmap-c)# set cos 3

RelatedCommand

Description

Commands

show policy-map

Displays the policy map configuration on the interface.

Platform

N/A

Description

2.18 show class-map
Use this command to display the class map.
show class-map [ class-map-name ]Parameter

Parameter

Description

Description

class-map-nameClass map name.

2-13

Command Reference

QoS Commands

Defaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays all class maps.

ExamplesRuijie# show class-map
Class Map cmap1
Match ip dscp 20 40
Class Map cmap2
Match access-group 110

The fields in the output of this command are described in the following table.
Field

Description

Class Map

Indicates the class map name.

Match

Indicates the matched rule.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.19 show mls qos interface
Use this command to display the QoS configuration of the interface.
show mls qos interface [ interface-name | policers ]Parameter

Parameter

Description

Description

interface-name

Interface namepolicers

Displays the traffic policing configured on the interface.

Defaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

2-14

Command Reference

QoS Commands

Configuration

The following example displays the QoS configuration of interface GigabitEthernet 0/17.

ExamplesRuijie# show mls qos interface gigabitethernet 0/17
Interface: GigabitEthernet 0/17
Ratelimit input: 10240 256
Ratelimit output:
Attached input

policy-map: pmap1

Attached output policy-map:
Default trust: dscp
Default cos: 3
The fields in the output of this command are described in the following table.
Field

Description

Interface

Indicates the interface name.

Ratelimit input

Indicates the input rate limit value.

Ratelimit output

Indicates the output rate limit value.

Attached input policy-map

Indicates the input policy map.

Attached output policy-map

Indicates the output policy map.

Default trust

Indicates the trust mode of the interface.

Default cos

Indicates the default CoS value.

The following example displays the QoS configuration of all interfaces.
Ruijie# show mls qos interface policers
Interface: GigabitEthernet 0/17
Attached input

policy-map: pmap1

Interface: GigabitEthernet 0/18
Attached input

policy-map: p1

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.20 show mls qos maps
Use this command to display DSCP-CoS mapping, CoS-DSCP mapping and IP-PRE-DSCP
mapping.
show mls qos maps [ cos-dscp | dscp-cos | ip-prec-dscp ]Parameter

Parameter

Description

Description

cos-dscp

Displays the CoS-DSCP mapping.

dscp-cos

Displays the DSCP-CoS mapping.

ip-prec-dscp

Displays the IP-PRE-DSCP mapping.

2-15

Command Reference

QoS Commands

Defaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the CoS-DSCP mapping.

ExamplesRuijie# show mls qos maps cos-dscp
cos dscp--- ---0

0

1

8

2

16

3

24

4

32

5

40

6

48

7

56

The fields in the output of this command are described in the following table.
Field

Description

cos

Indicates the CoS value.

dscp

Indicates the DSCP value mapped.

The following example displays the DSCP- CoS mapping.
Ruijie# show mls qos maps dscp-cos
dscp cos

dscp cos

dscp cos

dscp cos---- ------- ------- ------- ---

0

0

1

0

2

0

3

0

4

0

5

0

6

0

7

0

8

1

9

1

10

1

11

1

12

1

13

1

14

1

15

1

16

2

17

2

18

2

19

2

20

2

21

2

22

2

23

2

24

3

25

3

26

3

27

3

28

3

29

3

30

3

31

3

32

4

33

4

34

4

35

4

36

4

37

4

38

4

39

4

40

5

41

5

42

5

43

5

44

5

45

5

46

5

47

5

48

6

49

6

50

6

51

6

52

6

53

6

54

6

55

6

56

7

57

7

58

7

59

7

60

7

61

7

62

7

63

7

2-16

Command Reference

QoS Commands

The fields in the output of this command are described in the following table.
Field

Description

dscp

Indicates the DSCP value.

cos

Indicates the CoS value mapped.

The following example displays the IP-PRE-DSCP mapping.
Ruijie# show mls qos maps ip-prec-dscp
ip-precedence dscp------------- ---0 0
1 8
2 16
3 24
4 32
5 40
6 48
7 56
The fields in the output of this command are described in the following table.
Field

Description

ip-precedence

Indicates the IP-PRE value.

dscp

Indicates the DSCP value mapped.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.21 show mls qos queuing
Use this command to display the QoS queuing configuration.
show mls qos queueing [ interface interface-name ]Parameter

Parameter

Description

Description

interface interface-name

ID of interface.

Defaults

N/A

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the QoS queuing configuration.
2-17

Command Reference

ExamplesQoS Commands

Ruijie# show mls qos queueing
Cos-queue map:cos qid--- --0

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

wrr bandwidth weights:
qid weights--- ------1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

wfq bandwidth weights:
qid weights--- ------1

3

2

4

3

5

4

6

5

7

6

8

7

9

8

10

Interface: GigabitEthernet 0/17
Wrr queue bandwidth: 1 1 1 1 2 2 2 2
Wfq queue bandwidth: 1 1 2 2 4 4 4 4The fields in the output of this command are described in the following table.
Field

Description

Cos-queue map

Indicates the mapping between the CoS value
and the queue ID.

2-18

Command Reference

QoS Commands

wrr bandwidth weights

Indicates the WRR queue weight.

wfq bandwidth weights

Indicates the WFQ queue weight.

cos

Indicates the CoS value.

qid

Indicates the queue ID.

weights

Indicates the weight value

Ruijie# show mls qos queueing interface gigabitEthernet 0/17
Interface: GigabitEthernet 0/17
Wrr queue bandwidth: 1 1 1 1 2 2 2 2
Wfq queue bandwidth: 1 1 2 2 4 4 4 4RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.22 show mls qos rate-limit
Use this command to display the rate limiting configuration of the interface.
show mls qos rate-limit [ interface interface-name ]Parameter

Parameter

Description

Description

interface-name

Interface nameDefaults

N/A

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the rate limiting configuration of all interfaces.

ExamplesRuijie# show mls qos rate-limit
Interface: GigabitEthernet 0/17
rate limit input Kbps = 10240 burst = 256
Interface: GigabitEthernet 0/18
rate limit output Kbps = 102400 burst = 4096

The fields in the output of this command are described in the following table.
Field

Description

Interface

Indicates the interface name.

rate limit input Kbps = x burst = y

Indicates the input rate limit value, and the input

2-19Command Reference

QoS Commands

burst traffic limit value.
rate limit output Kbps = x burst = y

Indicates the output rate limit value, and theoutput burst traffic limit value.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.23 show mls qos scheduler
Use this command to display the queue scheduling policy.
show mls qos scheduler [ interface interface-name ]Parameter

Parameter

Description

Description

interface interface-name

ID of the interface.

Defaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the queue scheduling policy.

ExamplesRuijie# show mls qos scheduler
Global Multi-Layer Switching scheduling
Weighted Round Robin

The fields in the output of this command are described in the following table.
Field

Description

Weighted Round Robin

Indicates that the queue scheduling policy is
WRR.
The other queue scheduling policies are listed
as follows:
SP: Strict Priority
RR: Round Robin
WFQ: Weighted Fair Queue

RelatedCommand

Description

Commands

N/A

N/A

2-20

Command Reference

Platform

QoS Commands

N/A

Description

2.24 show mls qos virtual-group
Use this command to display the policy map configuration on the virtual group.
show mls qos virtual-group [ virtual-group-number | policers ]Parameter

Parameter

Description

Description

virtual-group-number

Virtual group number. The range is from 1 to 128.

policers

Displays the policy map configuration on all virtualgroups.

Defaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the policy map configuration on all virtual groups.

ExamplesRuijie# show mls qos virtual-group policers
Virtual-group: 1
Attached input policy-map: pmap1
Virtual-group: 20
Attached output policy-map: pmap2

The fields in the output of this command are described in the following table.
Field

Description

Virtual-group

Indicates the virtual group number.

Attached input policy-map

Indicates the policy map applied on the input
virtual group.

Attached output policy-map

Indicates the policy map applied on the output
virtual group.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2-21

Command Reference

QoS Commands

2.25 show policy-map
Use this command to display policy maps.
show policy-map [ policy-map-name [ class class-map-name ] ]Parameter

Parameter

Description

Description

policy-map-name

Policy map nameclass-map-nameClass map nameDefaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays configuration of policy map “pmap1”.

ExamplesRuijie# show policy-map pmap1
Policy Map pmap1
Class cmap1
set ip dscp 16
Class cmap2
police 10240 256 exceed-action dscp 8Class cmap3
police 512000 4096 exceed-action drop

The fields in the output of this command are described in the following table.
Field

Description

Policy Map

Indicates the policy map name.

Class

Indicates the class map name.

set

Indicates that the DSCP value is modified in thisexample.

policeIndicates bandwidth limit configuration and theaction policy for the violated packets.

The following example displays the action policy for the traffic of class map “cmap1” in policy map“pmap1”.
Ruijie# show policy-map pmap1 class cmap1
Class cmap1
set ip dscp 16

2-22

Command Reference

QoS Commands

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.26 show policy-map interface
Use this command to display the policy applied to an interface.
show policy-map interface interface-nameParameter

Parameter

Description

Description

interface-name

Interface nameDefaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the policy configuration of interface GigabitEthernet 0/17.

ExamplesRuijie# show policy-map interface gigabitEthernet 0/17
GigabitEthernet 0/17

input (tc policy): pm

Class cmcurrent token tbf: NULL
params: 10240 kbps, 256 limit, 0 extended limit , 0 pir
conformed 0 packets, 0 bytes; action: drop 0
exceeded 0 packets, 0 bytes; action: none 0
violated 0 packets, 0 bytes; action: none 0
cbucket 0, cbs 0; ebucket 0 ebs 0

The fields in the output of this command are described in the following table.
Field

Description

input (tc policy)

Indicates the input policy map name.

Class

Indicates the class map name.

current token tbf

Algorithm of token bucket. NULL indicatessingle token bucket algorithm.

paramsParameter, including the limits of guaranteedbandwidth, burst traffic and peak bandwidth

conformed

The number of packets lower than the limit ofguaranteed bandwidth

2-23Command Reference

QoS Commands

exceeded

The number of packets higher than the limit ofguaranteed bandwidth while lower than the limitof peak bandwidth

violated

The number of packets higher than the limit ofpeak bandwidth

cbucketNumber of tokens in bucket C

cbs

Size of bucket C

ebucketNumber of tokens in bucket E

ebs

Size of bucket E

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.27 show qos bandwidth
Use this command to display the bandwidth configuration.
show qos bandwidth [ interfaces interface-name ]Parameter

Parameter

Description

Description

interface-name

Interface nameDefaults

None

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the bandwidth configuration of interface GigabitEthernet 0/17.

Examples(Taking the device supporting the bandwidth configuration of the queue for example.)
Ruijie# show qos bandwidth interface gigabitEthernet 0/17
Interface: GigabitEthernet 0/17--------------------------------------------------queue-id | minimum-bandwidth | maximum-bandwidth---------------------------------------------

1

5120

10240

2

0

0

2-24

Command Reference

QoS Commands
3

0

0

4

0

0

5

0

0

6

0

0

7

0

0

8

0

0

--------------------------------------------------Total minimum-bandwidth:

5120

Total maximum-bandwidth:

10240

The fields in the output of this command are described in the following table.
Field

Description

Interface

Indicates the interface name.

queue-id

Indicates the queue ID.

minimum-bandwidth

Indicates the minimum bandwidth configuration.
The unit is Kbps.

maximum-bandwidth

Indicates the maximum bandwidthconfiguration. The unit is Kbps.

Total minimum-bandwidth

Indicates the total bandwidth of minimum andTotal maximum-bandwidth

maximum

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.28 show virtual-group
Use this command to display the member port in the virtual group.
show virtual-group [ virtual-group-number | summary ]Parameter

Parameter

Description

Description

virtual-group-number

Virtual group number. The range is from 1 to 128.

summary

Displays the member port in all virtual groups.

Defaults

N/A

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

Mode

Usage Guide

N/A

2-25

Command Reference

QoS Commands

Configuration

The following example displays the member port in all virtual groups.

ExamplesRuijie# show virtual-group summary
virtual-groupmember--------------------------------------

1

Gi0/172

Gi0/18The fields in the output of this command are described in the following table.
Field

Description

virtual-group

Indicates the virtual group number.

memberIndicates the member port in the virtual group.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.29 virtual-group
Use this command to create a virtual group in global configuration mode.
Use this command to configure add an interface to a virtual group in interface configuration mode.
Use the no or default form of this command to remove a virtual group in global configuration mode.
Use the no or default form of this command to remove an interface from a virtual group in interface
configuration mode.
virtual-group virtual-group-number
no virtual-group virtual-group-number
default virtual-group virtual-group-number

Parameter
Description

Parameter

Description

virtual-group-number

Virtual group number. The range is from 1 to 128.

Defaults

No virtual group is configured, or no interface is added to a virtual group, by default.

Command

Interface configuration mode, global configuration mode.

Mode

Usage Guide

The member port added to the virtual group must be a physical port or an aggregate port member.

Configuration

The following example sets the interface gigabitEthernet 0/17 as the member of virtual group 3:

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# virtual-group 3

2-26

Command Reference

RelatedCommands

Platform

QoS Commands

Command

Description

show virtual-group

Displays the virtual group configuration.

N/A

Description

2.30 wfq-queue bandwidth
Use this command to configure the WFQ queue weight ratio. Use the no or default form of thiscommand to restore the default setting.
wfq-queue bandwidth weight1 ... weight8
no wfq-queue bandwidthdefault wfq-queue bandwidthParameter
Description

Parameter

Description

weight1 ... weight8

8 queue weights. The default queue weight ratio is 1:1:1:1:1:1:1:1.
The weight range is from 0 to 15.

Defaults

The default queue weight ratio is 1:1:1:1:1:1:1:1.

Command

Global configuration mode.

Mode

Usage Guide

If the weight value is 0, the SP scheduling policy is applied.

Configuration

The following example configures the WFQ queue weight ratio to 1:1:2:4:4:4:6:8.

ExamplesRuijie(config)# wfq-queue bandwidth 1 1 2 4 4 4 6 8RelatedCommands

Platform

Command

Description

show mls qos queueing

Displays the QoS queuing configuration.

N/A

Description

2.31 wrr-queue bandwidth
Use this command to set the WRR weight ratio. Use the no or default form of this command torestore the default setting.
wrr-queue bandwidth weight1 ... weight8

2-27

Command Reference

QoS Commands

no wrr-queue bandwidthdefault wrr-queue bandwidthParameter

Parameter

Description

Description

weight1...weight8

8 queue weights. The default queue weight ratio is 1:1:1:1:1:1:1:1.
The weight range is from 0 to 15.

Defaults

The default queue weight ratio is 1:1:1:1:1:1:1:1.

Command

Global configuration mode

Mode

Usage Guide

If the weight value is 0, the SP scheduling policy is applied.

Configuration

The following example configures the WRR queue weight ratio to 1:1:1:1:2:2:4:8.

ExamplesRuijie(config)# wrr-queue bandwidth 1 1 1 1 2 2 4 8

Ruijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# wrr-queue bandwidth 1 1 2 2 2 2 4 4RelatedCommand

Description

Commands

show mls qos queuing

Displays the QoS queuing configuration.

Platform

N/A

Description

2-28

IP Address & Application Commands
1. IP Address and Service Commands
2. ARP Commands
3. IPv6 Commands
4. DHCP Commands
5. DHCPv6 Commands
6. DNS Commands
7. FTP Client Commands
8. Network Connectivity Test Tool Commands
9. TCP Commands
10. IPv4/IPv6 REF Commands

Command Reference

IP Address/Service Commands

1 IP Address/Service Commands
1.1 ip-address
Use this command to configure the IP address of an interface. Use the no form of this command torestore the default setting.
ip address ip-address network-mask [ secondary ]no ip address [ ip-address network-mask [ secondary ] ]Parameter
Description

Parameter

Description

ip-address

32-bit IP address, with 8 bits in one group in decimal format. Groups
are separated by dots.

network-mask

32-bit network mask. 1 stands for the mask bit, 0 stands for the hostbit, with 8 bits in one group in decimal format. Groups are separated bydots.

secondary

Secondary IP address

Defaults

No IP address is configured for the interface by default.

Command

Interface configuration mode

Mode

Usage Guide

The equipment cannot receive and send IP packets before it is configured with an IP address. Afteran IP address is configured for the interface, the interface is allowed to run the Internet Protocol(IP).

The network mask is also a 32-bit value that identifies which bits among the IP address is the
network portion. Among the network mask, the IP address bits that correspond to value “1” are the
network address. The IP address bits that correspond to value “0” are the host address. For
example, the network mask of Class A IP address is “255.0.0.0”. You can divide a network into
different subnets using the network mask. Subnet division means to use the bits in the host address
part as the network address part, so as to reduce the capacity of a host and increase the number of
networks. In this case, the network mask is called subnet mask.
A network hasn’t enough host addresses. At present, the LAN should be a class C network where
254 hosts can be configured. However, when there are more than 254 hosts in the LAN, anotherclass C network address is necessary since one class C network is not enough. Therefore, thedevice should be connected to two networks and multiple IP addresses should be configured.

Many older networks are layer 2-based bridge networks that have not been divided into different
subnets. Use of secondary IP addresses will make it very easy to upgrade this network to an IP

1-1

Command Reference

IP Address/Service Commands

layer-based routing network. The equipment configures an IP address for each subnet.

Two subnets of a network are separated by another network. You can create a subnet for the
separated network, and connect the separated subnet by configuring a secondary IP address. One
subnet cannot appear on two or more interfaces of a device.

Configuration

The following example configures the primary IP address and the network mask as 10.10.10.1 andExamples

255.255.255.0 respectively.
Ruijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# ip address 10.10.10.1 255.255.255.0

The following example configures the master and secondary IP addresses as 10.10.10.1/24 and10.10.20.1/24 respectively.
Ruijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# ip address 10.10.10.1 255.255.255.0
Ruijie(config-if-VLAN 1)# ip address 10.10.20.1 255.255.255.0 secondary

RelatedCommand

Description

Commands

show interface

Displays detailed information of the interface.

Platform

N/A

Description

1.2 ip broadcast-address
Use this command to define a broadcast address for an interface in the interface configuration
mode. Use the no form of this command to restore the default setting.
ip broadcast-addresss ip-address
no ip broadcast-addresss

Parameter

Parameter

Description

Description

ip-address

Broadcast address of IP network

Defaults

The default IP broadcast address is 255.255.255.255.

Command

Interface configuration mode.

Mode

Usage Guide

At present, the destination address of IP broadcast packet is all “1”, represented as
255.255.255.255. The RGOS software can generate broadcast packets with other IP addresses
through definition, and can receive both all “1” and the broadcast packets defined by itself.

Configuration

The following example sets the destination address of IP broadcast packets generated by thisExamplesinterface to 0.0.0.0.

1-2

Command Reference

IP Address/Service Commands

Ruijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ip broadcast-address 0.0.0.0

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.3 ip directed-broadcast
Use this command to enable the conversion from IP directed broadcast to physical broadcast
in the interface configuration mode. Use the no form of this command to restore the default
setting.
ip directed-broadcast [ access-list-number ]no ip directed-broadcast

Parameter

Parameter

Description

Description

access-list-number(Optional) Access list number, in the range from 1 to 199 and from1300 to 2699. After an access list number has been defined, only
the IP directed broadcast packets that match this access list areconverted.

Defaults

This function is disabled by default.

Command Mode

Interface configuration mode.

Usage Guide

IP directed broadcast packet is an IP packet whose destination address is an IP subnet
broadcast address. For example, the packet with the destination address 172.16.16.255 iscalled a directed broadcast packet. However, the node that generates this packet is not amember of the destination subnet.

The device that is not directly connected to the destination subnet receives an IP directedbroadcast packet and handles this packet in the same way as forwarding a unicast packet.
After the directed broadcast packet reaches a device that is directly connected to this subnet,
the device converts the directed broadcast packet into a flooding broadcast packet (typicallythe broadcast packet whose destination IP address is all “1”), and then sends the packet to all
the hosts in the destination subnet in the manner of link layer broadcast.

You can enable conversion from directed broadcast into physical broadcast on a specified
interface, so that this interface can forward a direct broadcast packet to a directly connected
network. This command affects only the final transmission of directed broadcast packets thathave reached the destination subnet instead of normal forwarding of other directed broadcast
packets.

1-3

Command Reference

IP Address/Service Commands

You can also define an access list on an interface to control which directed broadcast packets
to forward. After an access list is defined, only the packets that conform to the conditions
defined in the access list undergo conversion from directed broadcast into physical broadcast.

If the no ip directed-broadcast command is configured on an interface, RGOS will discard the
directed broadcast packets received from the directly connected network.

Configuration

The following example enables forwarding of directed broadcast packet on the vlan

Examplesdevice.

1of aRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ip directed-broadcast

Related Commands

Platform

Command

Description

N/A

N/A

N/A

Description

1.4 ip icmp error-interval
Use this command to set the rate to send the ICMP destination unreachable packets triggered by
DF in the IP header. Use the no form of this command to restore the default setting.
ip icmp error-interval DF milliseconds [ bucket-size ]no ip icmp error-interval DF milliseconds [ bucket-size ]Use this command to set the rate to send other ICMP error packets. Use the no form of thiscommand to restore the default setting.
ip icmp error-interval milliseconds [ bucket-size ]no ip icmp error-interval milliseconds [ bucket-size ]Parameter

Parameter

Description

Description
The refresh period of the token bucket, in the range from 0 to

milliseconds

2147483647 in the unit of milliseconds. 0 indicates no limit on
the rate to send ICMP error packets.
The default is 100.

bucket-size

The number of tokens in the bucket, in the range is from 1 to200. The default is 10.

Defaults

The default rate is 10 packets per 100 millisecond.

Command Mode

Global configuration mode.

Usage Guide

To prevent DoS attack, the token bucket algorithm is adopted to limit the rate to send ICMP error
packets.

1-4

Command Reference

IP Address/Service Commands

If IP packets need to be fragmented while the DF is set to 1, the device sends ICMP destination
unreachable packets numbered 4 to the source IP address for path MTU discovery. Rate limits on
ICMP destination unreachable packets and other error packets are needed to prevent path MTU
discovery failure.

It is recommended to set the refresh period to an integral multiple of 10 milliseconds. If the refresh
period is not an integral multiple of 10 milliseconds, it is adjusted automatically. For example, 1
per 5 milliseconds is adjusted to 2 per 10 milliseconds; 3 per 15 milliseconds is adjusted to 2 per
10 milliseconds.

Configuration

The following example sets the rate to send the ICMP destination unreachable packets triggered

Examplesby DF in the IP header to 100 per second.
Ruijie(config)# ip icmp error-interval DF 1000 100

The following example sets the rate to send other ICMP error packets to 10 per second.
Ruijie(config)# ip icmp error-interval 1000 10

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.5 ip mask-reply
Use this command to configure the RGOS software to respond the ICMP mask request andsend an ICMP response message in the interface configuration mode. Use the no form of thiscommand to restore the default setting.
ip mask-reply
no ip mask-reply

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command mode

Interface configuration mode.

Usage Guide

Sometimes, a network device needs the subnet mask of a subnet on the Internet. To obtainsuch information, the network device can send an ICMP mask request message, and the
network device that receives this message will send a mask response message.

Configuration

The following example sets the VLAN 1 interface of a device to respond the ICMP mask

1-5Command Reference

Examples

IP Address/Service Commands

request message.
Ruijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ip mask-reply

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.6 ip mtu
Use this command to set the Maximum Transmission Unit (MTU) for an IP packet in theinterface configuration mode. Use the no form of this command is restore the default setting.
ip mtu bytes
no ip mtu

Parameter

Parameter

Description

Description

bytes

Maximum transmission unit of IP packet , in the range from 68 to
1500 bytes

Defaults

It is the same as the value configured in the interface command mtu by default.

Command Mode

Interface configuration mode.

Usage Guide

If an IP packet is larger than the IP MTU, the RGOS software will split this packet. All thedevices in the same physical network segment must have the same IP MTU for theinterconnected interface.

If the interface configuration command mtu is used to set the maximum transmission unit valueof the interface, IP MTU will automatically match with the MTU value of the interface. However, if
the IP MTU value is changed, the MTU value of the interface will remain unchanged.

Configuration

The following iexample sets the IP MTU value of the VLAN 1 interface to 512 bytes.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ip mtu 512

RelatedCommand

Description

Commands

mtu

Sets the MTU value of an interface.

Platform

N/A

Description

1-6

Command Reference

IP Address/Service Commands

1.7 ip redirects
Use this command to allow the RGOS software to send an ICMP redirection message in the interface
configuration mode. Use the no form of this command to disable this function.
ip redirects
no ip redirects

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

When the route is not optimum, it may make the device to receive packets through one interface andsend it though the same interface. If the device sends the packet through the interface through which
this packet is received, the device will send an ICMP redirection message to the data source, tellingthe data source that the gateway for the destination address is another device in the subnet. In thisway the data source will send subsequent packets along the optimum path.

Configuration

The following example disables ICMP redirection for the VLAN 1 interface.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# no ip redirects

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.8 ip source-route
Use this command to allow the RGOS software to process an IP packet with source route informationin global configuration mode. Use the no form of this command to disable this function.
ip source-routeno ip source-route

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is enabled by default.

1-7Command Reference

Command

IP Address/Service Commands

Global configuration mode.

Mode

Usage Guide

RGOS supports IP source route. When the device receives an IP packet, it will check the options of
the IP packet, such as strict source route, loose source route and record route. Details about these
options can be found in RFC 791. If an option is found to be enabled in this packet, a response will bemade. If an invalid option is detected, an ICMP parameter problem message will be sent to the data
source, and then this packet is discarded.

Configuration

The following example disables the IP source route.

ExamplesRuijie(config)# no ip source-route

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.9 ip ttl
Use this command to set the TTL value of the unicast packet. Use the no form of this command torestore the default setting.
ip ttl value
no ip ttl

Parameter

Parameter

Description

Description

value

Sets the TTL value of the unicast packet, in the range from0 to 255.

Defaults

The default is 64.

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets the TTL value of the unicast packet to 100.

ExamplesRuijie(config)# ip ttl 100

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

1-8

Command Reference

IP Address/Service Commands

Description

1.10 ip unreachables
Use this command to allow the RGOS software to generate ICMP destination unreachable
messages. Use the no form of this command to disable this function.
ip unreachables
no ip unreachables

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

RGOS software will send a ICMP destination unreachable message if it receives unicast message
with self-destination-address and can not process the upper protocol of this message.

RGOS software will send ICMP host unreachable message to source data if it can not forward a
message due to no routing.

This command influences all ICMP destination unreachable messages.

Configuration

The following example disables sending ICMP destination unreachable message on VLAN 1.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# no ip unreachables

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.11 show ip interface
Use this command to display the IP status information of an interface.
show ip interface [ interface-type interface-number | brief ]Parameter

Parameter

Description

Description

interface-typeSpecifies interface type.

interface-number

Specifies interface number.

1-9

Command Reference

IP Address/Service Commands

brief

Displays the brief configurations about the IP of the layer-3 interface(including the interface primary ip, secondary ip and interface status)

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

Usage Guide

When an interface is available, RGOS will create a direct route in the routing table. The interface isavailable in that the RGOS software can receive and send packets through this interface. If theinterface changes from available status to unavailable status, the RGOS software removes theappropriate direct route from the routing table.

If the interface is unavailable, for example, two-way communication is allowed, the line protocol
status will be shown as “UP”. If only the physical line is available, the interface status will be shown as“UP”.

The results shown may vary with the interface type, because some contents are the interface-specificoptions

Configuration

The following exmaple displays the output of the show ip interface brirf command.

ExamplesRuijie(config)#show ip interface brief
Interface

IP-Address(Pri)

Status

IP-Address(Sec)ProtocolVLAN 1

10.10.10.1/24

no address

down

down
VLAN 1down

no addressno addressno addressno address

down

VLAN 4094
down

down

Ruijie(config)#
Description of fields in the command output is as follows:
Field

Description

StatusLink status of an interface. The value can be up, down, or administratively down.

ProtocolIPv4 protocol status of an interface.

The following example displays the output of the show ip interface vlan command.
Ruijie# show ip interface vlan 1
VLAN 1
IP interface state is: DOWN
IP interface type is: BROADCAST
IP interface MTU is: 1500
IP address is:
1.1.1.1/24 (primary)

1-10

Command Reference

IP Address/Service Commands

IP address negotiate is: OFF
Forward direct-broadcast is: OFF
ICMP mask reply is: ON
Send ICMP redirect is: ON
Send ICMP unreachabled is: ON
DHCP relay is: OFF
Fast switch is: ON
Help address is:
Proxy ARP is: OFF
ARP packet input number: 0
Request packet:
Reply packet:

00

Unknown packet: 0
TTL invalid packet number: 0
ICMP packet input number: 0
Echo request:

0

Echo reply: 0
Unreachable:

0

Source quench:0

Routing redirect:0

Description of fields in the command output is as follows:
Field
IP interface state is

IP interface type is

Description
The network interface is available, and both its interface
hardware status and line protocol status are “UP”.
Show the interface type, such as broadcast, point-to-point,
etc.

IP interface MTU isShow the MTU value of the interface.

IP address isShow the IP address and mask of the interface.

IP address negotiate isShow whether the IP address is obtained throughnegotiation.

Forward direct-broadcast isShow whether the directed broadcast is forwarded.

ICMP mask reply isShow whether an ICMP mask response message is sent.

Send ICMP redirect isShow whether an ICMP redirection message is sent.

Send ICMP unreachabled isShow whether an ICMP unreachable message is sent.

DHCP relay isShow whether the DHCP relay is enabled.

Fast switch isShow whether the IP fash switching function is enabled.

Route horizontal-split isShow whether horizontal split is enabled, which will affectthe route update behavior of the distance vector protocol.

Help address isShow the helper IP address.

Proxy ARP isShow whether the agent ARP is enabled.

1-11

Command Reference

IP Address/Service Commands

ARP packet input number
Request packet
Reply packet
Unknown packet
TTL invalid packet number
ICMP packet input number
Echo request
Echo reply
Unreachable
Source quench
Routing redirectShow the total number of ARP packets received on theinterface, including:
ARP request packet
ARP reply packet
Unknown packet
Show the TTL invalid packet number
Show the total number of ICMP packets received on theinterface, including:
Echo request packet
Echo reply packet
Unreachable packet
Source quench packet
Routing redirection packet

RelatedCommand

Description

Commands

N/A.

N/A.

Platform

N/A.

Description

1.12 show ip packet queue
Use this command to display the statistics of IP packet queues.
show ip packet queue

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

Command Mode

Privileged EXEC mode.

Usage Guide

N/A.

Configuration

The following example displays the statistics of IP packet queues.

ExamplesRG-S29 series products do not support the VRF parameter. The following example is forreference purpose. Please take the actual product as the standard.
Ruijie# show ip packet queue
Receive 31925 packets(fragment=0):
IP packet receive queue: length 0, max 1542, overflow 0.
Receive 13 ICMP echo packets, 25 ICMP reply packets .
Discards:

1-12

Command Reference

IP Address/Service Commands
Failed to alloc skb: 0.
Receive queue overflow: 0.
Unknow protocol drops: 0.
ICMP rcv drops: 0. for skb check fail.
ICMP rcv drops: 0. for skb is broadcast.

Sent packets:
Success: 15644
Generate 13 and send 8 ICMP reply packets, send 26 ICMP echo packets.
It records 187 us as max time in ICMP reply process.
Failed to alloc efbuf: 0
Dropped by EFMP: 0
NoRoutes: 887
Get vrf fails: 0
Cannot assigned address drops: 0
Failed to encapsulate ethernet head: 0
ICMP error queue: length 0, max 1542, overflow 0.

Field

Description

IP packet receive queue

Statistics of received packets

Discards

Statistics of discarded packets

Sent packets

Statistics of sent packets

ICMP error queue

Statistics of ICMP error packets

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.13 show ip packet statistics
Use this command to display the statistics of IP packets.
show ip packet statistics [ interface-name | total ]Parameter

Parameter

Description

Description

interface-name

Interface name

total

Displays the total statistics of all interfaces.

Defaults

N/A.

Command Mode

Privileged EXEC mode.

1-13

Command Reference

IP Address/Service Commands

Usage Guide

N/A.

Configuration

The following example displays the output of this command.

ExamplesRuijie# show ip packet statistics
Total
Received 113962 packets, 11948991 bytes
Unicast:90962,Multicast:5232,Broadcast:17768
Discards:0
HdrErrors:0(BadChecksum:0,TTLExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 34917 packets, 1863146 bytes
Unicast:30678,Multicast:4239,Broadcast:0
GigabitEthernet 0/17
Received 6715 packets, 416587 bytes
Unicast:2482,Multicast:4233,Broadcast:0
Discards:0
HdrErrors:0(BadChecksum:0,TTLExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 6720 packets, 417096 bytes
Unicast:2481,Multicast:4239,Broadcast:0
Loopback 0
Received 0 packets, 0 bytes
Unicast:0,Multicast:0,Broadcast:0
Discards:0
HdrErrors:0(BadChecksum:0,TTLExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 0 packets, 0 bytes
Unicast:0,Multicast:0,Broadcast:0
Tunnel 1
Received 0 packets, 0 bytes
Unicast:0,Multicast:0,Broadcast:0
Discards:0
HdrErrors:0(BadChecksum:0,TTLExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 21584 packets, 1122848 bytes
Unicast:21584,Multicast:0,Broadcast:0

RelatedCommand

Description

Commands

N/A

N/A

1-14

Command Reference

Platform

IP Address/Service Commands

N/A

Description

1.14 show ip raw-socket
Use this command to display IPv4 raw sockets.
show ip raw-socket [ num ]Parameter

Parameter

Description

Description

numProtocol.

Defaults

N/A.

Command Mode

Priviledged EXEC mode.

Usage Guide

N/A.

Configuration

The following example displays all IPv4 raw sockets.

ExamplesRuijie# show ip raw-socket
Number Protocol Process name1

ICMP

dhcp.elf2

ICMP

vrrp.elf3

IGMP

igmp.elf

4

VRRP

vrrp.elf

Total: 4

Description of fields in the command output is as follows:
Field

Description

NumberNumberProtocolProtocol

Process name

Process name

Total

Total number

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.15 show ip sockets
Use this command to display all IPv4 sockets.

1-15

Command Reference

IP Address/Service Commands

show ip sockets

Parameter

Parameter

Description

Description

N/A.

N/A.

Defaults

N/A.

Command Mode

Privileged EXEC mode.

Usage Guide

N/A.

Configuration

The following displays all IPv4 sockets.

ExamplesRuijie# show ip sockets
Number Process name

Type

Protocol LocalIP:Port ForeignIP:Port

State
1

dhcp.elf

RAW

ICMP

0.0.0.0:1

0.0.0.0:0

vrrp.elf

RAW

ICMP

0.0.0.0:1

0.0.0.0:0

igmp.elf

RAW

IGMP

0.0.0.0:2

0.0.0.0:0

vrrp.elf

RAW

VRRP

0.0.0.0:112

0.0.0.0:0

dhcpc.elf

DGRAM

UDP

0.0.0.0:68

0.0.0.0:0

rg-snmpd

DGRAM

UDP

0.0.0.0:161

0.0.0.0:0

wbav2

DGRAM

UDP

0.0.0.0:2000 0.0.0.0:0

*
2
*
3
*
4
*
5
*
6
*
7
*
8

vrrp_plus.elf

DGRAM

UDP

0.0.0.0:3333 0.0.0.0:0

mpls.elf

DGRAM

UDP

0.0.0.0:3503 0.0.0.0:0

rds_other_th

DGRAM

UDP

0.0.0.0:3799 0.0.0.0:0

rg-snmpd

DGRAM

UDP

0.0.0.0:14800 0.0.0.0:0

rg-sshd

STREAM

TCP

0.0.0.0:22

0.0.0.0:0

rg-telnetd

STREAM

TCP

0.0.0.0:23

0.0.0.0:0

wbard

STREAM

TCP

0.0.0.0:4389 0.0.0.0:0

wbard

STREAM

TCP

0.0.0.0:7165 0.0.0.0:0

*
9
*
10
*
11
*
12
LISTEN13
LISTEN
14
LISTEN15

1-16

Command Reference

IP Address/Service Commands

LISTEN
Total: 15

Description of fields in the command output is as follows:
Field

Description

NumberSerial number.

Process name

Process name.
Socket type, including the following types:

Type

RAW: raw sockets
DGRAM: datagram type
STREAM: stream type.

ProtocolProtocol.

LocalIP:Port

Local IP address and port.

ForeignIP:Port

Peer IP address and port.

StateState. This field is for only TCP sockets.

Total

The total number of sockets.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.16 show ip udp
Use this command to display IPv4 UDP sockets.
show ip udp [ local-port num | peer-port num ]Use this command to display IPv4 UDP socket statistics.
show ip udp statistics

Parameter

Parameter

Description

Description

local-port num

Local port number

peer-port num

Peer port number

Defaults

N/A.

Command Mode

Privileged EXEC mode.

Usage Guide

N/A.

Configuration

The following example displays all IPv4 UDP sockets.

1-17

Command Reference

Examples

IP Address/Service Commands

Ruijie# show ip udp
Number Local AddressPeer Address

Process name1

0.0.0.0:68

0.0.0.0:0

dhcpc.elf

2

0.0.0.0:161

0.0.0.0:0

rg-snmpd

3

0.0.0.0:2000

0.0.0.0:0

wbav2

4

0.0.0.0:3333

0.0.0.0:0

vrrp_plus.elf

50.0.0.0:3503

0.0.0.0:0

mpls.elf

60.0.0.0:3799

0.0.0.0:0

rds_other_th

7

0.0.0.0:14800

0.0.0.0:0

rg-snmpd

Description of fields in the command output is as follows:
Field

Description

NumberNumber.

Local Address

Local IP address and port.

Peer AddressPeer IP address and port.

Process name

Process name.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1-18

Command Reference

ARP Commands

2 ARP Commands
2.1 arp
Use this command to add a permanent IP address and MAC address mapping to the ARP cachetable. Use the no form of this command to restore the default setting.
arp ip-address MAC-address typeno arp ip-address

Parameter

Parameter

Description

Description

ip-address

The IP address that corresponds to the MAC address. It includes four partsof numeric values in decimal format separated by dots.

MAC-address

48-bit data link layer address.

type

ARP encapsulation type. The keyword is arpa for the Ethernet interface.

Defaults

There is no static mapping record in the ARP cache table by default.

Command

Global configuration mode.

Mode

Usage Guide

RGOS finds the 48-bit MAC address according to the 32-bit IP address using the ARP cache table.
Since most hosts support dynamic ARP resolution, usually static ARP mapping is not necessary.
The clear arp-cache command can be used to delete the ARP mapping that is learned
dynamically.

Configuration

The following example sets an ARP static mapping record for a host in the Ethernet.

ExamplesRuijie(config)# arp 1.1.1.1 4e54.3800.0002 arpa

RelatedCommand

Description

Commands

clear arp-cache

Clears the ARP cache table

Platform

N/A

Description

2.2 arp anti-ip-attack
For the messages corresponds to the directly-connected route, if the switch does not learn the
ARP that corresponds to the destination IP address, it is not able to forward the message in
hardware, and it needs to send the message to the CPU to resolve the address(that is the ARP
learning). Sending large number of this message to the CPU will influence the other tasks ofthe switch. To prevent the IP messages from attacking the CPU, a discarded entry is set to the

2-1Command Reference

ARP Commands

hardware during the address resolution, so that all sequential messages with that destination
IP address are not sent to the CPU. After the address resolution, the entry is updated to theforwarding status, so that the switch could forward the message with that destination IP
address in hardware.
In general, during the ARP request ,if the switch CPU receives three destination IP address
messages corresponding to the ARP entry, it is considered to be possible to attack the CPU
and the switch sets the discarded entry to prevent the unknown unicast message fromattacking the CPU. User could set the num parameter of this command to decide whether it
attacks the CPU in specific network environment or disable this function. Use the arp
anti-ip-attack command to set the parameter or disable this function. Use the no form of thiscommand to restore the default setting.
arp anti-ip-attack num
no arp anti-ip-attack

Parameter

Parameter

Description

Descriptionnum

The number of the IP message to trigger the ARP to set thediscarded entry in the range from 0 to 100. 0 stands fordisabling the arp anti-ip-attack function.

Defaults

By default, set the discarded entry after 3 unknown unicast messages are sent to the CPU.

Command Mode

Global configuration mode.

Usage Guide

The arp anti-ip-attack function needs to occupy the switch hardware routing resources when
attacked by the unknown unicast message. If there are enough resources, the arp
anti-ip-attack num could be smaller. If not, in order to preferential ensure the use of thenormal routing, the num could be larger or disable this function.

Configuration

The following example sets the IP message number that triggers to set the discarding entry as

Examples5.
Ruijie(config)# arp anti-ip-attack 5

The following example disables the ARP anti-ip-attack function.
Ruijie(config)# arp anti-ip-attack 0

Related Commands

Platform

Command

Description

N/A

N/A

N/A

Description

2.3 arp retry interval
Use this command to set the frequency for sending the arp request message locally, namely, the

2-2Command Reference

ARP Commands

time interval between two continuous ARP requests sent for resolving one IP address. Use the noform of this command

to restore the default setting.

arp retry interval seconds
no arp retry intervalParameter

Parameter

Description

Description

seconds

Time for retransmitting the ARP request message in the range from
1 to 3600 in the unit of seconds.

Defaults

The default is 1.

Command

Global configuration mode.

Mode

Usage Guide

The switch sends the ARP request message frequently, and thus causing problems like network
busy. In this case, you can set the retry interval of the ARP request message longer. In general, it
should not exceed the aging time of the dynamic ARP entry.

Configuration

The following example sets the retry interval of the ARP request as 30 seconds.

ExamplesRuijie(config)# arp retry interval 30

RelatedCommand

Description

Commands

arp retry times

Number of times for retransmitting an ARP request message.

Platform

N/A

Description

2.4 arp retry times
Use this command to set the local retry times of the ARP request message, namely, the times ofsending the ARP request message to resolve one IP address. Use the no form of this command torestore the default setting.
arp retry times number
no arp retry times

Parameter

Parameter

Description

Description

number

The times of sending the same ARP request in the range from 1
to100.When it is set as 1, it indicates that the ARP request is not
retransmitted, only 1 ARP request message is sent.

Defaults

The default is 5.

Command

Global configuration mode.

2-3

Command Reference

ARP Commands

Mode

Usage Guide

The switch sends the ARP request message frequently, and thus causing problems like network
busy. In this case, you can set the retry times of the ARP request smaller. In general, the retry times
should not be set too large.

Configuration

The following example sets the local ARP request not to be retried.

ExamplesRuijie(config)# arp retry times 1

The following example sets the local ARP request to be retried for one time.
Ruijie(config)# arp retry times 2

RelatedCommand

Description

Commands

arp retry intervalInterval for retransmitting an ARP request message

Platform

N/A

Description

2.5 arp timeout
Use this command to configure the timeout for the ARP static mapping record in the ARP cache.
Use the no form of this command to restore the default setting.
arp timeout seconds
no arp timeout

Parameter

Parameter

Description

Description

secondsv

The timeout is in the range from 0 to 2147483 in the unit of seconds.

Defaults

The default is 3600.

Command

Global configuration mode

Mode

Usage Guide

The ARP timeout setting is only applicable to the IP address and the MAC address mapping thatare learned dynamically. The shorter the timeout, the truer the mapping table saved in the ARP
cache, but the more network bandwidth occupied by the ARP. Hence the advantages anddisadvantages should be weighted. Generally it is not necessary to configure the ARP timeout
unless there is a special requirement.

Configuration

The following example sets the timeout for the dynamic ARP mapping record that is learned

Examplesdynamically from GigabitEthernet port 0/17 to 120 seconds.
Ruijie(config)# arp timeout 120

RelatedCommand

Description

2-4

Command Reference

Commands

Platform

ARP Commands

clear arp-cache

Clears the ARP cache list.

show interfaces

Displays the interface information.

N/A

Description

2.6 arp unresolve
Use this command to set the maximum number of the unresolved ARP entries. Use no form of thiscommand to restore the default setting.
arp unresolve number
no arp unresolve

Parameter

Parameter

Description

Description

number

The maximum number of the unresolved ARP entries in the range
from 1 to the ARP table size supported by the device.

Defaults

The default is the ARP table size supported by the device.

Command

Global configuration mode.

Mode

Usage Guide

If there are a large number of unresolved entries in the ARP cache table and they do not disappear
after a period of time, this command can be used to limit the quantity of the unresolved entries.

Configuration

The following example sets the maximum number of the unresolved items to 500.

ExamplesRuijie(config)# arp unresolve 500

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.7 clear arp-cache
Use this command to remove a dynamic ARP mapping record from the ARP cache table and clear
an IP route cache table.
clear arp-cache [ ip [ mask ] ] | interface interface-type interface-number ]Parameter
Description

Parameter

Description

ip

Deletes ARP entries of the specified IP address. If trusted value is

2-5

Command Reference

ARP Commands

specified, trusted ARP entries are deleted; otherwise, all dynamic
ARP entries are deleted which is the default.
mask

Deletes ARP entries in a subnet mask. If trusted value is specified,trusted ARP entries in the subnet mask are deleted; otherwise, alldynamic ARP entries are deleted. The dynamic ARP entry
specified by the IP address is deleted by default.

Commandinterface interface-type

Deletes dynamic ARP entries on the specified interface. Dynamic

interface-number

ARP entries are deleted on all interfaces by default.

Privileged EXEC mode

Mode

Usage Guide

This command can be used to refresh an ARP cache table.

On a NFPP-based (Network Foundation Protection Policy) device, it receives one ARP packet forevery mac/ip address per second by default. If the interval of two clear arp times is within 1s, thesecond response packet will be filtered and the ARP packet will not be resolved for a short time.

Configuration

The following example deletes all dynamic ARP mapping records.

ExamplesRuijie# clear arp-cache

The following deletes the dynamic ARP entry 1.1.1.1.
Ruijie# clear arp-cache 1.1.1.1

The following example deletes the dynamic ARP entry on interface SVI1.
Ruijie# clear arp-cache interface vlan 1

RelatedCommand

Description

Commands

arp

Adds a static mapping record to the ARP cache table.

Platform

N/A

Description

2.8 show arp
Use this command to display the Address Resolution Protocol (ARP) cache tableshow arp [ interface-type interface-number | [ip [ mask ] | mac-address | static | complete |incomplete ] ]Parameter
Description

Parameter

Description

interface-type

Displays the ARP entry of a specified Layer-2 or Layer-3 port.

interface-number
ip

Displays the ARP entry of the specified IP address. If trusted is2-6

Command Reference

ARP Commands

configured, only trusted ARP entries are displayed. Otherwise, untrusted
ARP entries are displayed.
Displays the ARP entries of the network segment included within themaskmask. If trusted is configured, only trusted ARP entries are displayed.
Otherwise, untrusted ARP entries are displayed.

static

Displays all the static ARP entries.

complete

Displays all the resolved dynamic ARP entries.

incomplete

Displays all the unresolved dynamic ARP entries.

mac-address

Displays the ARP entry with the specified mac address.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the output result of the show arp command:

ExamplesRuijie# show arp
Total Numbers of Arp: 7
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.68 0 0013.20a5.7a5f arpa VLAN 1
Internet 192.168.195.67 0 001a.a0b5.378d arpa VLAN 1
Internet 192.168.195.65 0 0018.8b7b.713e arpa VLAN 1
Internet 192.168.195.64 0 0018.8b7b.9106 arpa VLAN 1
Internet 192.168.195.63 0 001a.a0b5.3990 arpa VLAN 1
Internet 192.168.195.62 0 001a.a0b5.0b25 arpa VLAN 1
Internet 192.168.195.5 -- 00d0.f822.33b1 arpa VLAN 1

Description of fields in the command output is as follows:
Field

Description

ProtocolProtocol of the network address, always to be Internet

Address

IP address corresponding to the hardware address

Age (min)Age of the ARP cache record, in minutes; If it is not locally or staticallyconfigured, the value of the field is represented with “-”.

HardwareHardware address corresponding to the IP address

Type

Hardware address type, ARPA for all Ethernet addresses

Interface

Interface associated with the IP addresses

The following example displays the output result of show arp 192.168.195.68
Ruijie# show arp 192.168.195.68
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.68 1 0013.20a5.7a5f arpa VLAN 1

2-7

Command Reference

ARP Commands

The following example displays the output result of show arp 192.168.195.0 255.255.255.0
Ruijie# show arp 192.168.195.0 255.255.255.0
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.64 0 0018.8b7b.9106 arpa VLAN 1
Internet 192.168.195.2 1 00d0.f8ff.f00e arpa VLAN 1
Internet 192.168.195.5 -- 00d0.f822.33b1 arpa VLAN 1
Internet 192.168.195.1 0 00d0.f8a6.5af7 arpa VLAN 1
Internet 192.168.195.51 1 0018.8b82.8691 arpa VLAN 1

The following example displays the output result of show arp 001a.a0b5.378d
Ruijie# show arp 001a.a0b5.378d
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.67 4 001a.a0b5.378d arpa VLAN 1

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.9 show arp counter
Use this command to display the number of ARP entries in the ARP cache table.
show arp counter

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the output result of the show arp counter command:

ExamplesRuijie#sho arp counter
ARP Limit:

2000

Count of static entries: 0
Count of dynamic entries: 1 (complete: 1 incomplete: 0)
Total:

1

2-8

Command Reference

ARP Commands

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.10 show arp detail
Use this command to display the details of the Address Resolution Protocol (ARP) cache table.
show arp detail [ interface-type interface-number | ip [ mask ] | mac-address | static | complete |incomplete ]Parameter
Description

Parameter

Description

interface-type interface-number

Displays the ARP of the layer 2 port or the layer 3 interface.

ip

Displays the ARP entry of the specified IP address.

mask

Displays the ARP entries of the network segment included
within the mask.

mac-address

Displays the ARP entry of the specified MAC address.

static

Displays all the static ARP entries.

complete

Displays all the resolved dynamic ARP entries.

incomplete

Displays all the unresolved dynamic ARP entries.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

Use this command to display the ARP details, such as the ARP type (Dynamic, Static, Local, Trust),
the information on the layer2 port.
If you enter a min_value greater than max_value, no error message is prompted. Instead, ARP
entries corresponding to the subvlan are displayed.

Configuration

The following example displays the output result of the show arp detail command:

ExamplesRuijie# show arp detail
IP Address MAC Address Type Age(min) Interface Port
20.1.1.1 000f.e200.0001 Static -- -- -20.1.1.1 000f.e200.0001 Static -- Vl3 -20.1.1.1 000f.e200.0001 Static -- Vl3
193.1.1.70 00e0.fe50.6503 Dynamic 1 Vl3
192.168.0.39 0012.a990.2241 Local -- Vl3 -192.168.0.1 0012.a990.2241 Local -- Vl3 --2-9Command Reference

ARP Commands

The following example displays arp details including InnerVLAN on products supporting QinQ
termination:
Ruijie# show arp detail
IP Address
SubVlan

MAC AddressType

Age(min)Interface Port

InnerVlan

20.1.1.20020.0101.0002

Static--V1

1.1.1.100d0.f822.33bb

Local

--

Vl2

--

---

--

Description of fields in the command output is as follows:
Field

Description

IP Address

IP address corresponding to the hardware address

MAC Address

hardware address corresponding to the IP address

Age (min)Age of the ARP learning, in minutes

Port

Layer2 port associated with the ARPType

ARP type, includes the Static, Dynamic, Trust,Local

Interface

Layer 3 interface associated with the IP addresses

SubVLANSubVLAN corresponding to the ARP entries

InnerVLAN

InnerVLAN or CE-VLAN corresponding to the ARP entries

Location

Local: ARP entries are generated or learned on the local
device.
Remore: ARP entries are synced from a remote gateway.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.11 show arp packet statistics
Use this command to display the statistics of ARP packets.
show arp packet statistics [ interface-type interface-number ]Parameter

Parameter

Description

Description

interface-type

Displays the statistics of ARP packets on the specified interface.

interface-number

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

2-10

Command Reference

ARP Commands

Usage Guide

N/A.

Configuration

The following example displays the output information of the command.

ExamplesRuijie# show arp packet statistics
Interface Received Received Received Sent Sent
Name Requests Replies Others Requests Replies--------- -------- -------- -------- -------- ------VLAN 1 10 20 1 50 10
VLAN 2 5 8 0 10 10
VLAN 3 20 5 0 15 12
VLAN 4 5 8 0 10 10
VLAN 5 20 5 0 15 12
VLAN 6 20 5 0 15 12
VLAN 7 20 5 0 15 12
VLAN 8 5 8 0 10 10
VLAN 9 20 5 0 15 12
VLAN 10 20 5 0 15 12
VLAN 11 20 5 0 15 12
VLAN 12 20 5 0 15 12

Description of fields in the command output is as follows:
Field

description

Received Requests

Number of received ARP requests

Received Replies

Number of received ARP response messages

Received Others

Number of other received ARP packets

Sent Requests

Number of sent ARP requests

Sent Replies

Number of sent ARP requests

RelatedCommand

Description

Commands

N/A.

N/A.

Platform

N/A

Description

2.12 show arp timeout
Use this command to display the aging time of a dynamic ARP entry on the interface.
show arp timeout

Parameter

Parameter

Description

Description

N/A.

N/A.

2-11

Command Reference

ARP Commands

Defaults

N/A.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A.

Configuration

The following example displays the output of the show arp timeout command:

ExamplesRuijie# show arp timeout
Interface arp timeout(sec)---------------------- ---------------VLAN 1 3600

RelatedCommand

Description

Commands

N/A.

N/A.

Platform

N/A

Description

2.13 show ip arp
Use this command to display the Address Resolution Protocol (ARP) cache table.
show ip arp

Parameter

Parameter

Description

Description

N/A.

N/A.

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A.

Configuration

The following example displays the output of show ip arp:

ExamplesRuijie#show ip arp
Protocol Address

Age(min) Hardware

Internet 1.1.1.1<static> 4e54.3800.0002 arpa

Total number of ARP entries: 1

Description of fields in the command output is as follows:
Field

Description

2-12

Type

InterfaceCommand Reference

ARP Commands

ProtocolNetwork address protocol, always Internet.

AddressThe IP address corresponding to the hardware address.

Age (min)Hardware
Type
InterfaceAge of the ARP cache record, in minutes; If it is not locally or staticallyconfigured, the value of the field is represented with “-”.
Hardware address corresponding to the IP address
The type of hardware address. The value is ARPA for all Ethernet
addresses.
Interface associated with the IP address.

RelatedCommand

Description

Commands

N/A.

N/A.

Platform

N/A

Description

2-13

Command Reference

IPv6 Commands

3 IPv6 Commands
3.1 clear ipv6 neighbors
Use this command to clear the dynamic IPv6 neighbors.
clear ipv6 neighbors [ interface-id ]Parameter

Parameter

Description

Description
Interface name. Clear the dynamically learned IPv6

interface-id

neighbors on the specified interface.

Defaults

N/A

Command Mode

Privileged EXEC mode.

Usage Guide

This command does not clear all the dynamic neighbors on authentication VLAN.
Note that the static neighbors will not be cleared.

Configuration

The following example clears the dynamic IPv6 neighbors.

ExamplesRuijie# clear ipv6 neighbors

Related Commands

Command

Description

ipv6 neighbor

Configures the neighbor.

show ipv6 neighbors

Displays the neighbor information.

Platform

N/A

Description

3.2 ipv6 address
Use this command to configure an IPv6 address for a network interface. Use the no form of thiscommand to restore the default setting.
ipv6 address ipv6-address/prefix-length
ipv6 address ipv6-prefix/prefix-length eui-64
ipv6 address prefix-name sub-bits/prefix-length [ eui-64 ]no ipv6 address
no ipv6 address ipv6-address/prefix-lengthno ipv6 address ipv6-prefix/prefix-length eui-64
no ipv6 address prefix-name sub-bits/prefix-length [ eui-64 ]3-1

Command Reference

IPv6 Commands

Parameter

Parameter

Description

Description

iipv6-prefix

IPv6 address prefix in the format defined in RFC4291. The address
shall be in hex; the fields in the address shall be separated by comma,
and each field shall contain 16 bits.

ipv6-address

IPv6 address in the format defined in RFC4291. The address shall bein hex; the fields in the address shall be separated by comma, andeach field shall contain 16 bits.

prefix-length

Length of the IPv6 prefix, the network address of the IPv6 address.
Note: The prefix length range of the IPv6 address of the interface of
S86 is 0 to 64 or 128 to 128.

prefix-name

The general prefix name. Use the specified general prefix to generate
the interface address.

sub-bits

The value of the sub-prefix bit and the host bit generates the interface
address combining with the general prefix. The value shall be in theformat defined in the RFC4291.

eui-64

The generated IPv6 address consists of the address prefix and the 64
bit interface ID

Defaults

N/A

Command

Interface configuration mode

Mode

Usage Guide

When an IPv6 interface is created and the link status is UP, the system will automatically generate alocal IP address for the interface.
The IPv6 address could also be generated using the general prefix. That is, the IPv6 address consistsof the general prefix and the sub-prefix and the host bit. The general prefix could be configured using
the ipv6 general-prefix command or may be learned through the DHCPv6 agent PD (Prefix
Discovery) function (please refer to the DHCPv6 Configuration). Use the sub-bits/prefix-lengthparameter of this command to configure the sub-prefix and the host bit.
If no deleted address is specified when using no ipv6 address, all the manually configured
addresses will be deleted.
no ipv6 address ipv6-prefix/prefix-length eui-64 can be used to delete the addresses configured with
ipv6 address ipv6-prefix/prefix-length eui-64.

Configuration

Ruijie(config)# interface VLAN 1

ExamplesRuijie(config-if-VLAN 1)# ipv6 address 2001:1::1/64
Ruijie(config-if-VLAN 1)# no ipv6 address 2001:1::1/64
Ruijie(config-if-VLAN 1)# ipv6 address 2002:1::1/64 eui-64
Ruijie(config-if-VLAN 1)# no ipv6 address 2002:1::1/64 eui-64

RelatedCommand

Description

Commands

N/A

N/A

3-2

Command Reference

Platform

IPv6 Commands

N/A

Description

3.3 ipv6 address autoconfig
Use this command to automatically configure an IPv6 stateless address for a network interface. Use
the no form of this command to restore the default setting.
ipv6 address autoconfig [ default ]no ipv6 address autoconfig

Parameter

Parameter

Description

Description

default(Optional) If this keyword is configured, a default routing is generated. Note that only
one layer3 interface on the entire device is allowed to use the default keyword

Defaults

N/A

Command

Interface configuration mode

Mode

Usage Guide

The stateless automatic address configuration is that when receiving the RA (Route Advertisement)
message, the device could use the prefix information of the RA message to automatically generate
the EUI-64 interface address.
If the RA message contains the flag of the “other configurations”, the interface will obtain these “otherconfigurations” through the DHCPv6. The “other configurations” usually means the IPv6 address of
the DNS server, the IPv6 address of the NTP server, etc.
Use the no ipv6 address autoconfig command to delete the IPv6 address.

Configuration

Ruijie(config)# interface VLAN 1

ExamplesRuijie(config-if-VLAN 1)# ipv6 address autoconfig default
Ruijie(config-if-VLAN 1)# no ipv6 address autoconfig

RelatedCommand

Description

Commands

ipv6 address ipv6-prefix/prefix-length [ eui-64 ]Configures the IPv6 address for the interface
manually.

Platform

N/A

Description

3.4 ipv6 enable
Use this command to enable the IPv6 function on an interface. Use the no form of this command torestore the default setting.
ipv6 enable3-3

Command Reference

IPv6 Commands

no ipv6 enable

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

The IPv6 function of an interface can be enabled by configuring ipv6 enable or by configuring IPv6
address for the interface.
If an IPv6 address is configured for the interface, the IPv6 function will be enabled automaticallyon the interface and cannot be disabled with no ipv6 enable.

Configuration

The following example enables the IPv6 function on VLAN.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 enable

RelatedCommand

Description

Commands

show ipv6 interface

Displays the related information of an interface.

Platform

N/A

Description

3.5 ipv6 general-prefix
Use this command to configure the IPv6 general prefix in the global configuration mode.
ipv6 general-prefix prefix-name ipv6-prefix/prefix-lengthno ipv6 general-prefix prefix-name ipv6-prefix/prefix-length

Parameter

Parameter

Description

Description

prefix-name

The general prefix name.

pv6-prefix

The network prefix value of the general-prefix following theformat defined in RFC4291.

prefix-length

Defaults

N/A

Command

Global configuration mode.

The length of the general prefix.

Mode

Usage Guide

It is convenient to number the network by using the general prefix, which defines a prefix so that many

3-4

Command Reference

IPv6 Commands

longer specified prefixes could refer to it. These specified prefixes are updated whenever the generalprefix changes. If the network number changes, just modify the general prefix.
A general prefix could contain multiple prefixes.
These longer specified prefixes are usually used for the Ipv6 address configuration on the interface.

Configuration

The following example configures manually a general prefix as my-prefix.

ExamplesRuijie(config)# ipv6 general-prefix my-prefix 2001:1111:2222::/48

RelatedCommand

Description

Commands

ipv6 address prefix-name

Configures the interface address using the general prefix.

sub-bits/prefix-length
show ipv6 general-prefix

Platform

Displays the general prefix.

N/A

Description

3.6 ipv6 hop-limit
Use this command to configure the default hopcount to send unicast messages in the global
configuration mode.
ipv6 hop-limit value
no ipv6 hop-limit

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The default is 64.

Command Mode

Global configuration mode.

Usage Guide

This command takes effect for the unicast messages only, not for multicast messages.

Configuration

The following example sets the default hopcount to 100.

ExamplesRuijie(config)# ipv6 hop-limit 100

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3-5Command Reference

IPv6 Commands

3.7 ipv6 icmp error-interval
Use this command to set the frequency with which ICMPv6-oversize error packets are sent. Use theno form of this command to restore the default setting.
ipv6 icmp error-interval too-big milliseconds [ bucket-size ]no ipv6 icmp error-interval too-big milliseconds [ bucket-size ]Use this command to set the frequency with which other ICMPv6 error packets are sent. Use the noform of this command to restore the default setting.
ipv6 icmp error-interval milliseconds [ bucket-size ]no ipv6 icmp error-interval milliseconds [ bucket-size ]Parameter

Parameter

Description

Description

Sets the refresh interval of the token bucket, in therange from 0 to 2147483647 in the unit of seconds.

milliseconds

Setting the value to 0 indicates that the frequency withwhich ICMPv6 error packets are sent is not fixed.
Sets the number of tokens in the token bucket, in thebucket-size

range from 1 to 200.

Defaults

The default milliseconds is 100 and bucket-size is 10.

Command

Global configuration mode

Mode

Usage Guide

The token bucket algorithm is adopted to set the frequency with which ICMPv6 error packets are sentso as to prevent Denial of Service (DoS) attack,If the forwarded IPv6 packet is greater than the egress IPv6 MTU in size, the router discards the IPv6
packet and sends the ICMPv6-oversize error packet to the source IPv6 address. This kind of ICMPv6
error packet is used for IPv6 path MTU discovery. If there are too many ICMPv6 error packets, theICMPv6-oversize error packet may not be sent, causing IPv6 path MTU discovery failure. Therefore,
it is recommended to set the frequency of ICMPv6-oversize error packet and other ICMPv6 error
packet respectively. Note that ICMPv6 redirect packet is not an ICMPv6 error packet and Ruijie sets
the frequency of the ICMPv6 redirect packet the same as that of other ICMPv6 error packet.
For the timer is accurate to 10 milliseconds, it is recommended to set the refresh interval of the token
bucket to an integer multiple of 10 milliseconds. If the refresh interval is not an integer multiple of 10
milliseconds, it is converted automatically. For example, the frequency of 1 per five milliseconds turns
out to be 2 per 10 milliseconds; the frequency of 3 per 15 milliseconds is converted to 2 per 10
milliseconds.

Configuration

The following example sets the frequency with which ICMPv6-oversize error packets are sent to 100

Examplesper second.
Ruijie(config)# ipv6 icmp error-interval too-big 1000 100

The following example sets the frequency with which other ICMPv6 error packets are sent to 10 per

3-6

Command Reference

IPv6 Commands

second.
Ruijie(config)# ipv6 icmp error-interval 1000 10

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.8 ipv6 mtu
Use this command to configure the MTU of IPv6 packets. Use the no form of this command to restore
the default setting.
ipv6 mtu bytes
no ipv6 mtu

Parameter
Description

Parameter

Description

bytes

MTU of IPv6 packets, in bytes. The value ranges from 1280 to 1500.

Defaults

The default configuration is the same as the configuration of the mtu command.

Command

Interface configuration mode

Mode

Usage Guide

If the size of an IPv6 packet exceeds the IPv6 MTU, the RGOS software segments the packet. For all
devices in the same physical network segment, the IPv6 MTU of the interconnected interface must be
the same.

Configuration

The following example sets the IPv6 MTU of the VLAN 1 interface to 1400 bytes.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 mtu 1400

RelatedCommand

Description

Commands

mtu

Sets the MTU of an interface.

Platform

This command cannot be used on Layer 2 devices.

Description

3.9 ipv6 nd cache interface-limit
Use this command to set the maximum number of neighbors learned on the interface. Use the noform of this command to restore the default setting.
ipv6 nd cache interface-limit value

3-7Command Reference

IPv6 Commands

no ipv6 nd cache interface-limit

Parameter

Parameter

Description

Description

Sets the maximum number of neighbors learned on
the interface, including the static and dynamic
value

neighbors, in the range from 0 to the number
supported by the device. 0 indicates the number is not
limited.

Defaults

The default is 0.

Command

Interface configuration mode

Mode

Usage Guide

This function can prevent neighbor entries generated by malicious neighbor attacks from consuming
memory. limit must be no smaller than the number of neighbors learned on the interface. Otherwise,
the configuration does not take effect.

Configuration

The following example sets the number of neighbors learned on the interface to 100.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)7# ipv6 nd cache interface-limit 100

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.10 ipv6 nd dad attempts
Use this command to set the number of the NS packets to be continuously sent for IPv6 addresscollision check on the interface. Use the no form of this command to restore it to the default setting.
ipv6 nd dad attempts value
no ipv6 nd dad attempts value

Parameter
Description

Parameter
value

Description
Number of the NS packets. If it is set to 0, it indicates that the IPv6
address collision check is disabled on the interface. The range is 0 to 600.

Defaults

The default is 1.

Command

Interface configuration mode.

Mode

3-8

Command Reference

Usage Guide

IPv6 Commands

When the interface is configured with a new IPv6 address, the address collision shall be checked
before the address is assigned to the interface, and the address shall be in the ”tentative” status. Afterthe address collision check is completed, if no collision is detected, the address can be usednormally; if collision is detected and the interface ID of the address is an EUI-64 ID, it indicates thatthe link-layer address is repeated, and the system will automatically shut down the interface (that is,
to prohibit IPv6 operations on the interface). In this case, you shall modify and configure a new
address manually, and restart address collision check for the down/up interface. Whenever the stateof an interface changes from down to up, the address collision check function of the interface will beenabled.

Configuration

The following example sets the number of the NS packets to 3.

ExamplesRuijie(config)# interface VLAN 1
RRuijie(config-if-VLAN 1)# ipv6 nd dad attempts 3

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

Platform

N/A

Description

3.11 ipv6 nd dad retry
Use this command to set the interval for address conflict detection. Use the no form of this command
to restore the default setting.
ipv6 nd dad retry value
no ipv6 nd dad retry

Parameter

Parameter

Description

Description

Sets the interval for address conflict detection, 60
value

seconds by default. Setting value to 0 indicates thatthe function is disabled.

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

Before configuring a new IPv6 address for an interface, enable address conflict detection on theinterface. If a conflict address is detected, the device does not receive the IPv6 packet destined to theconflict address. This command is used to perform conflict detection again when the interval expires.
If there is no conflict, the address can be used.

Configuration

The following example sets the interval for address conflict detection to 10s.

3-9Command Reference

IPv6 Commands

ExamplesRuijie(config)# ipv6 nd dad retry 10

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.12 ipv6 nd managed-config-flag
Use this command to set the “managed address configuration” flag bit of the RA message. Use theno form of this command to restore the default setting.
ipv6 nd managed-config-flag
no ipv6 nd managed-config-flag

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

Command

Interface configuration mode.

Mode

Usage Guide

This flag determines whether the host that receives the RA message obtains an IP address throughstateful auto configuration. If the flag is set, the host obtains an IP address through stateful auto
configuration, otherwise it does not be used.

Configuration

The following example sets the “managed address configuration” flag bit of the RA message.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd managed-config-flag

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

ipv6 nd other-config-flag

Sets the flag for obtaining all information except IP
address through stateful auto configuration.

Platform

N/A

Description

3.13 ipv6 nd ns-interval
Use this command to set the interval for the interface to retransmitting NS (Neighbor Solicitation). Use

3-10

Command Reference

IPv6 Commands

the no form of this command to restore the default setting.
ipv6 nd ns-interval milliseconds
no ipv6 nd ns-intervalParameter

Parameter

Description

Description

milliseconds

Interval for retransmitting NS in the range of 1000 to 429467295 milliseconds

Defaults

The default value in RA is 0 (unspecified); the interval for retransmitting NS is 1000 milliseconds (1second).

Command

Interface configuration mode.

mode

Usage Guide

The configured value will be advertised through RA and will be used by the device itself. It is notrecommended to set a too short interval.

Configuration

The following example sets the interval for the interface to retransmitting NS to 2,000 seconds.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd ns-interval 2000

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

Platform

N/A

Description

3.14 ipv6 nd other-config-flag
Use this command to set “other stateful configuration” flag bit of the RA message. Use the no form of
this command to delete the flag bit.
ipv6 nd other-config-flag
no ipv6 nd other-config-flag

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The flag bit is not set by default.

Command

Interface configuration mode.

mode

Usage Guide

With this flag bit set, the flag bit of the RA message sent by the device is set. After receiving this flag
bit, the host uses the dhcpv6 to acquire the information excluding the IPv6 address for the purpose of

3-11

Command Reference

IPv6 Commands

automatic configuration. When the managed address configuration is set, the default otherstateful configuration is also set

Configuration

The follwong example sets “other stateful configuration” flag bit of the RA message.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd other-config-flag

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

Platform

N/A

Description

3.15 ipv6 nd prefix
Use this command to configure the address prefix included in the RA. Use the no form of thiscommand to delete the set prefix or restore the default setting.
ipv6 nd prefix { ipv6-prefix/prefix-length | default } [ [ valid-lifetime preferred-lifetime ] | [ at valid-date
preferred-date ] | [ infinite | preferred-lifetime ] ] [ no-advertise] | [ [ off-link ] [ no-autoconfig ] ] |[ pool pool-name ] ]no ipv6 nd prefix { ipv6-prefix/prefix-length | default }Parameter

Parameter

Description

Description

ipv6-prefix

IPv6 network ID following the format defined in RFC4291

prefix-length

Length of the IPv6 prefix. “/” shall be added in front of the prefix

valid-lifetime

Valid lifetime of the RA prefix received by the host

preferred-lifetime

Preferred lifetime of the RA prefix received by the hostat valid-date preferred-date

Sets the dead line for the valid lifetime and that of the preferred
lifetime, in day, month, year, hour, minute.

infinite

Indicates that the prefix is always valid.

default

Sets the default prefix.

no-advertise

The prefix will not be advertised by the device.
When the host sends an IPv6 packet, if the prefix of the destination

off-link

address matches the set prefix, it is considered that the destination is
on-link and is directly reachable. If this option is set, it indicates thatthe prefix is not used for on-link judgment.

no-autoconfig
pool pool-nameDefaults

Indicates that the RA prefix received by the host cannot be used forauto address configuration.
Indicates the IPv6 prefix pool

By default, the advertised prefix is the one set with ipv6 address on the interface. The default
parameters of the prefix configured in the RA are as follows:
valid-lifetime: 2592000s (30 days)

3-12

Command Reference

IPv6 Commands

preferred-lifetime: 604800s (7 days),
The prefix is advertised and is used for on-link judgment and auto address configuration.

Command

Interface configuration mode.

Mode

Usage Guide

This command can be used to configure the parameters of each prefix, including whether to advertisethe prefix. By default, the prefix advertised in RA is the one set with ipv6 address on the interface. To
add other prefixes, use this command.
ipv6 nd prefix default
Set the default parameters to be used by the interface. If no parameter is specified for an added
prefix, the parameters set with ipv6 nd prefix default will be used. Note that after a parameter is
specified for the prefix, the default configuration will not be used. That is to say, the configuration of
the prefix cannot be modified with ipv6 nd prefix default; only the prefix that uses all the default
configurations can be modified with this command.
at valid-date preferred-date
The valid lifetime of a prefix can be specified in two ways. One way is to specify a fixed time for eachprefix in the RA; the other way is to specify the end time (in this mode, the valid lifetime of the prefix
sent in RA will be gradually reduced until the end time is 0).

Configuration

The following example adds a prefix for SVI 1.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd prefix 2001::/64 infinite 2592000

The following example sets the default prefix parameters for SVI 1 (they cannot be used for auto
address configuration):
Ruijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd prefix default no-autoconfig

If no parameter is specified, the default parameters will be used, and the prefix cannot be used forauto address configuration.

RelatedCommand

Description

Commands

show ipv6 interface

Displays the RA information of an interface.

Platform

N/A

Description

3.16 ipv6 nd ra-hoplimit
Use this command to set the hopcount of the RA message. Use the no form of this command torestore the default setting.
ipv6 nd ra-hoplimit value
no ipv6 nd ra-hoplimit

3-13Command Reference

IPv6 Commands

Parameter

Parameter

Description

Description

value

HopcountDefaults

The default is 64.

Command

Interface configuration mode.

Mode

Usage Guide

This command is used to set the hopcount of the RA message.

Configuration

The following example sets the hopcount of the RA message.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd ra-hoplimit 110

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

ipv6 nd ra-lifetime

Sets the lifetime of the device.

ipv6 nd ra-interval

Sets the interval of sending the RA message.

ipv6 nd ra-mtu

Sets the MTU of the RA message.

Platform

N/A

Description

3.17 ipv6 nd ra-interval
Use this command to set the interval of sending the RA. Use the no form of this command to restore
the default setting.
ipv6 nd ra-interval { seconds | min-max min_value max_value }no ipv6 nd ra-interva lParameter

Parameter

Description

Description

seconds

Interval of sending the RA message in seconds, 3-1800s.

min-max

Maximum and minimum interval sending the RA message in seconds

min_value

Minimum interval sending the RA message in seconds

max_value

Maximum interval sending the RA message in seconds

Defaults

200s. The actual interval of sending the RA message will be fluctuated 20% based on 200s.

Command

Interface configuration mode.

Mode

Usage Guide

If the device serves as the default device, the set interval shall not be longer than the lifetime of the

3-14

Command Reference

IPv6 Commands

device. Besides, to ensure other devices along the link occupies network bandwidth while sending the
RA message, the actual interval for sending the RA message will be fluctuated 20% based on the set
value.
If the key word min-max is specified, the actual interval for sending the packet will be chosen
between the range of minimum value and maximum value.

Configuration

The following example sets the interval of sending the RA.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd ra-interval 110
Ruijie(config-if-VLAN 1)# ipv6 nd ra-interval min-max 110 120

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

ipv6 nd ra-lifetime

Sets the lifetime of the device.

ipv6 nd ra-hoplimit

Sets the hopfcount of the RA message.

ipv6 nd ra-mtu

Sets the MTU of the RA message.

Platform

N/A

Description

3.18 ipv6 nd ra-lifetime
Use this command to set the device lifetime of the RA sent on the interface. Use the no form of thiscommand to restore the default setting.
ipv6 nd ra-lifetime seconds
no ipv6 nd ra-lifetime

Parameter
Description

Parameterseconds

Defaults

The default is 1800.

Command

Interface configuration mode.

Description
Default life time of the device on the interface, in the range
from 0 to 9000 in the unit of seconds.

Mode

Usage Guide

The router lifetime field is available in each RA. It specifies the time during which the hosts along thelink of the interface can select the device as the default device. If the value is set to 0, the device will
not serve as the default device any longer. If it is not set to 0, it shall be larger than or equal to theinterval of sending the RA (ra-interval)

Configuration

The following example sets the device lifetime of the RA sent on the interface.

ExamplesRuijie(config)# interface VLAN 1

3-15

Command Reference

IPv6 Commands

Ruijie(config-if-VLAN 1)# ipv6 nd ra-lifetime 2000

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

ipv6 nd ra-interval

Sets the interval of sending the RA.

ipv6 nd ra-hoplimit

Sets the hopcount of the RA.

ipv6 nd ra-mtu

Sets the MTU of the RA.

Platform

N/A

Description

3.19 ipv6 nd ra-mtu
Use this command to set the MTU of the RA message. Use the no form of this command to restore
the default setting.
ipv6 nd ra-mtu value
no ipv6 nd ra-mtu

Parameter

Parameter

Description

Description

value

MTU value, in the range from 0 to 4294967295.

Defaults

IPv6 MTU value of the network interface.

Command

Interface configuration mode.

Mode

Usage Guide

If it is specified as 0, the RA will not have the MTU option

Configuration

The following example sets the MTU of the RA message.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd ra-mtu 1400

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

ipv6 nd ra-lifetime

Sets the lifetime of the device.

ipv6 nd ra-interval

Sets the interval of sending the RA message.

ipv6 nd ra-hoplimit

Sets the hopcount of the RA message.

Platform

N/A

Description

3-16

Command Reference

IPv6 Commands

3.20 ipv6 nd reachable-time
Use this command to set the reachable time after the interface checks the reachability of the neighbor
dynamically learned through NDP. Use the no form of this command to restore the default setting.
ipv6 nd reachable-time milliseconds
no ipv6 nd reachable-timeParameter
Description

Defaults

Parameter
milliseconds

Description
Reachable time for the neighbor in the range from 0 to 3600000 in the unit ofmilliseconds.

The default value in RA is 0 (unspecified); the reachable time for the neighbor is 30000 milliseconds(30 seconds) when the device discovers the neighbor.

Command

Interface configuration mode.

Mode

Usage Guide

The device checks the unreachable neighbor through the set time. A shorter time means that thedevice can check the neighbor failure more quickly, but more network bandwidth and device resource
will be occupied. Therefore, it is not recommended to set a too short reachable time.
The configured value will be advertised through RA and will be used by the device itself. If the value isset to 0, it indicates that the time is not specified, that is, the default value is used.
According to RFC4861, the actual time to reach neighbor is not consistent with the configured value,
ranging from 0.5*configured value to 1.5*configured value.

Configuration

The following example sets the reachable time.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd reachable-time 1000000

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

Platform

N/A

Description

3.21 ipv6 nd state-time
Use this command to set the period for the neighbor to maintain the state. Use the no form of thiscommand to restore the default setting.
ipv6 nd stale-time seconds
no ipv6 nd stale-timeParameter

Parameter

Description

3-17

Command Reference

Description

IPv6 Commands

Sets the period for the neighbor to maintain the state,

Seconds

Defaults

The default is 3600.

Command

Global configuration modein the range from 0 to 86400 in the unit of seconds.

Mode

Usage Guide

This command is used to set the period for the neighbor to maintain the state. After the period
expires, neighbor unreachability detection is performed. The shorter the period, the faster theneighbor is found unreachable. On the other hand, more network bandwidth and device resources
are consumed. Therefore, it is recommended to set a value not too small.

Configuration

The following example sets the period to 600 seconds for the neighbor to maintain the state.

ExamplesRuijie(config)# ipv6 nd stale-time 600

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.22 ipv6 nd suppress-ra
Use this command to disable the interface from sending the RA message. Use the no form of
this command to enable the function.
ipv6 nd suppress-ra
no ipv6 nd suppress-ra

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The ipv6 nd suppress-ra command is enabled by default.

Command Mode

Interface configuration mode.

Usage Guide

This command suppresses the sending of the RA message on an interface.

Configuration

The following example disables the interface from sending the RA message.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 nd suppress-ra

RelatedCommand

Description

3-18

Command Reference

IPv6 Commands

Commands

show ipv6 interface

Platform

N/A

Displays the interface information.

Description

3.23 ipv6 nd unresolved
Use this command to set the maximum number of the unresolved neighbor table entries. Use the noform of this command to restore the default setting.
ipv6 nd unresolved number
no ipv6 nd unresolved

Parameter

Parameter

Description

Description

Sets the maximum number of the unresolved neighbor
numbertable entries, in the range from 1 to the neighbor tablesize supported by the device.

Defaults

The default is 0. The maximum number is the neighbor table size supported by the device.

Command

Global configuration mode

Mode

Usage Guide

This command is used to prevent unresolved ND table entries generated by malicious scan attacks
from consuming table entry resources,

Configuration

The following example sets the maximum number of the unresolved neighbor table entries to 200.

ExamplesRuijie(config)# ipv6 nd unresolved 200

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.24 ipv6 neighbor
Use this command to configure a static neighbor. Use the no form of this command to delete a staticneighbor.
ipv6 neighbor ipv6-address interface-id hardware-address
no ipv6 neighbor ipv6-address interface-id

Parameter

Parameter

Description

Description

ipv6-address

The neighbor IPv6 address, in the form as defined in

3-19Command Reference

IPv6 Commands

RFC 4291.
Specifies the network interface where the neighbor isinterface-id(including Router Port, L3 AP port and SVI interface).
The 48-bit MAC address, a dotted triple of four-digit

hardware-address

hexadecimal numbers.

Defaults

No static neighbor is configured by default.

Command

Global configuration mode

Mode

Usage Guide

This command can only be configured on the interface enabled with IPv6 protocol, similar to the ARP
command.
If the neighbor to be configured has been learned through Neighbor Discovery Protocol (NDP) andstored in the NDP neighbor table, the dynamic neighbor turns to be static. If the static neighbor isvalid, it is always reachable. An invalid static neighbor refers to the neighbor whose IPv6 address is
not valid (not in the IPv6 network segment configured for the interface or interface address conflict).
The packet is not forwarded to the MAC address as specified by the invalid static neighbor. The
invalid static neighbor is in inactive state. Use the show ipv6 neighbor static command to display thestate of the static neighbor.
Use the clear ipv6 neighbors command to clear all neighbors learned dynamically through NDP.

Configuration

The following example configures a static neighbor on SVI 1.

ExamplesRuijie(config)# ipv6 neighbor 2001::1 vlan 1 00d0.f811.1111

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.25 ipv6 ns-linklocal-src
Use this command to set the local address of the link as the source IP address to send neighborrequests. Use the no form of this command to use the global IP address w as the source address tosend neighbor requests.
ipv6 ns-linklocal-src
no ipv6 ns-linklocal-src

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The local address of the link is always used as the source address to send neighbor requests.

3-20

Command Reference

Command

IPv6 Commands

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example sets the local address of the link as the source IP address to send neighbor

Examplesrequests.
Ruijie(config)# no ipv6 ns-linklocal-src

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.26 ipv6 redirects
Use this command to control whether to send ICMPv6 redirect message when the switch receives
and forwards an IPv6 packet through an interface. Use the no form of this command to restore thedefault setting.
ipv6 redirects
no ipv6 redirects

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Interface configuration mode.

Mode

Usage Guide

The transmission rate of any ICMPv6 error message is limited. By default, it is 10pps.

Configuration The following example enables ICMPv6 redirection on interface VLAN 1.
ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 redirects

RelatedCommand

Description

Commands

show ipv6 interface

Displays the interface information.

Platform

N/A

Description

3-21

Command Reference

IPv6 Commands

3.27 ipv6 source-route
Use this command to forward the IPv6 packet with route header. Use the no form of this command torestore the default setting.
ipv6 source-routeno ipv6 source-route

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The ipv6 source-route command is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

Because of the potential security of the header of type 0 route, it’s easy for the device to suffer fromthe denial service attack. Therefore, forwarding the IPv6 packet with route header is disabled bydefault. However, the IPv6 packet of route header with type 0 that destined to the local machine isprocessed.

Configuration

The following example forwards the IPv6 packet with route header.

ExamplesRuijie(config)# no ipv6 source-route

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.28 show ipv6 address
Use this command to display the IPv6 addresses.
show ipv6 address [ interface-name ]Parameter
Description

Parameter

Description

interface-name

Interface nameDefaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

3-22

Command Reference

IPv6 Commands

Configuration

The following example displays all IPv6 address configured on the device.

ExamplesRuijie# show ipv6 address
Global unicast address limit: 1024, Global unicast address count: 2
Tentative address count: 3,Duplicate address count: 0
Preferred address count: 0,Deprecated address count: 0
VLAN 1
2003:1::23/64

Tentative

Preferred lifetime: INFINITE, Valid lifetime: INFINITE
fe80::2d0:f8ff:fefb:deb2/64

Tentative

Preferred lifetime: INFINITE, Valid lifetime: INFINITE
2005:1::1111/64

Tentative

Preferred lifetime: INFINITE, Valid lifetime: INFINITE

The following example displays the IPv6 address configured on the VLAN 1.
Ruijie# show ipv6 address VLAN 1
Global unicast address count: 2
Tentative address count: 3,Duplicate address count: 0
Preferred address count: 0,Deprecated address count: 0
2003:1::23/64

Tentative

Preferred lifetime: INFINITE, Valid lifetime: INFINITE
fe80::2d0:f8ff:fefb:deb2/64

Tentative

Preferred lifetime: INFINITE, Valid lifetime: INFINITE
2005:1::1111/64

Tentative

Preferred lifetime: INFINITE, Valid lifetime: INFINITE

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.29 show ipv6 general-prefix
Use this command to display the information of the general prefix.
show ipv6 general-prefix

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

3-23

Command Reference

IPv6 Commands

Mode

Usage Guide

Use this command to display the information of the general prefix including the manually configured
and learned from the DHCPv6 agent.

Configuration

The following example displays the information of the general prefix.

ExamplesRuijie# show ipv6 general-prefix
There is 1 general prefix.
IPv6 general prefix my-prefix, acquired via Manual configuration
2001:1111:2222::/48
2001:1111:3333::/48

RelatedCommand

Description

Commands

ipv6 general-prefix

Configures the general prefix.

Platform

N/A

Description

3.30 show ipv6 interface
Use this command to display the IPv6 interface information.
show ipv6 interface [ interface-id ] [ ra-info ] ] [ brief [ interface-id ] ]Parameter

Parameter

Description

Description

interface-id

Interface (including Ethernet interface, aggregate port, or SVI)

ra-info

Displays the RA information of the interface.

brief

Defaults

N/A

CommandPrivileged EXEC mode.

Displays the brief information of the interface (interface status andaddress information).

Mode

Usage Guide

Use this command to display the address configuration, ND configuration and other information of an
IPv6 interface.

Configuration

The following example displays the information of the IPv6 interface.

ExamplesRuijie# show ipv6 interface vlan 1
Interface vlan 1 is Up, ifindex: 2001
address(es):
Mac Address: 00:00:00:00:00:01
INET6: fe80::200:ff:fe00:1 , subnet is fe80::/64
Joined group address(es):3-24Command Reference

IPv6 Commands

ff01:1::1
ff02:1::1
ff02:1::2
ff02:1::1:ff00:1
INET6: 2001::1 , subnet is 2001::/64 [TENTATIVE]
Joined group address(es):ff01:1::1
ff02:1::1
ff02:1::2
ff02:1::1:ff00:1
MTU is 1500 bytes
ICMP error messages limited to one every 10 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND advertised reachable time is 0 milliseconds
ND retransmit interval is 1000 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 200 seconds<240--160>
ND device advertisements live for 1800 seconds

The following line is included in the above information: 2001::1, subnet is 2001::/64 [TENTATIVE].
The flag bit in the [ ] following the INET6 address is explained as follows:
Flag

Description

ANYCAST

Indicate that the address is an anycast address.

TENTATIVE

Indicate that the DAD is underway. The address is a tentative
before the DAD is completed.

DUPLICATED

Indicate that a duplicate address exists.

DEPRECATED

Indicate that the preferred lifetime of the address expires.

NODAD

Indicate that no DAD is implemented for the address.

AUTOIFID

Indicate that the interface ID of the address is automaticallygenerated by the system, which is usually an EUI-64 ID.

The following example displays the RA information of the IPv6 interface.
Ruijie# show ipv6 interface vlan 1 ra-info
vlan 1: DOWN
RA timer is stopped
waits: 0, initcount: 3
statistics: RA(out/in/inconsistent): 4/0/0, RS(input): 0
Link-layer address: 00:00:00:00:00:01
Physical MTU: 1500
ND device advertisements live for 1800 seconds
ND device advertisements are sent every 200 seconds<240--160>

3-25

Command Reference

IPv6 Commands

Flags: !M!O, Adv MTU: 1500
ND advertised reachable time is 0 milliseconds
ND advertised retransmit time is 0 milliseconds
ND advertised CurHopLimit is 64
Prefixes: (total: 1)
fec0:1:1:1::/64(Def,Auto,vltime: 2592000, pltime: 604800, flags: LA)

Description of the fields in ra-info is as follows:
Field

Description

RA timer is stopped (on)Indicates whether the RA timer is started.

waits
initcount

Indicates that the RS is received but the number of the responses is
not available.
Indicates the number of the RAs when the RA timer is restarted.
out: Indicates the number of the RAs that are sent.
In: Indicate the number of the RAs that are received.

RA(out/in/ inconsistent)

inconsistent: Indicates the number of the received RAs in which theparameters are different from those contained in the RAs advertisedby the device.

RS(input)

Indicates the number of the RSs that are received.

Link-layer address

Link-layer address of the interface.

Physical MTU

Link MTU of the interface.

!M | M!O | O!M indicates the managed-config-flag bit in the RA is not set.
M: Conversely!O indicates the other-config-flag bit in the RA is not set.
O: Conversely

Description of the fields of the prefix list in ra-info is as follows:
Field

Description

total

The number of the prefixes of the interface.

fec0:1:1:1::/64

A specific prefix.

Def

Indicates that the interfaces use the default prefix.
Auto: Indicates the prefix is automatically generated after theAuto | CFG

interface is configured with the corresponding IPv6 address. CFG:
Indicates that the prefix is manually configured.

!Adv

Indicates that the prefix will not be advertised.

vltimeValid lifetime of the prefix, measured in seconds.

pltimePreferred lifetime of the prefix, measured in seconds.

3-26

Command Reference

IPv6 Commands

L: Indicates that the on-link in the prefix is set.

L | !L!L: Indicates that the on-link in the prefix is not set.
A: Indicates that the auto-configure in the prefix is set. !A: It indicatesA | !A

that the auto-configure in the prefix is not set.

The following example displays the brief information of the IPv6 interface.
Ruijie# show ipv6 interface brief
VLAN 1[down/down]
2222::2
FE80::1614:4BFF:FE5C:ED3A

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.31 show ipv6 neighbors
Use this command to display the IPv6 neighbors.
show ipv6 neighbors [ verbose ] [ interface-id ] [ ipv6-address ]show ipv6 neighbors static

Parameter

Parameter

Description

Description

verbose

Displays the neighbor details.

static

Displays the validity status of static neighbors.

interface-id

Displays the neighbors of the specified interface.

ipv6-addres

Displays the neighbors of the specified IPv6 address.

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the neighbors on the SVI 1 interface:

ExamplesRuijie# show ipv6 neighbors vlan 1
IPv6 Address Linklayer Addr Interface
fa::1 00d0.0000.0002 vlan 1
fe80::200:ff:fe00:2 00d0.0000.0002 vlan 1
Show the neighbor details:

3-27Command Reference

IPv6 Commands

Ruijie# show ipv6 neighbors verbose
IPv6 Address Linklayer Addr Interface
2001::1 00d0.f800.0001 vlan 1
State: Reach/H Age: - asked: 0fe80::200:ff:fe00:1 00d0.f800.0001 vlan 1
State: Reach/H Age: - asked: 0

Description of fields in the command output is as follows:
Field
IPv6
Address
Linklayer
Addr
Interface

Description
IPv6 address of the Neighbor

Link address, namely, MAC address. If it is not available, incomplete is displayed.
Interface the neighbor locates.
State of the neighbor: state/H(R)The values of STATE are as below:
INCMP (Incomplete): The address resolution of the neighbor is underway, the NS issent, but the NA is not received.
REACH (Reachable): The switch is connected with the neighbor. In this state, theswitch takes no additional action when sending packets to the neighbor.
STALE: The reachable time of the neighbor expires. In this state, the switch takes noadditional action; it only starts NUD (Neighbor Unreachability Detection) after apacket is sent to the neighbor.

State

DELAY: A packet is sent to the neighbor in STALE state. If the STALE state changes
to DELAY, DELAY will be changed to PROBE if no neighbor reachability notificationis received within DELAY_FIRST_PROBE_TIME seconds (5s), the NS will be sent to
the neighbor to start NUD.
PROBE: The NUD is started to check the reachability of the neighbor. The NS
packets are sent to the neighbor at the interval of RetransTimer milliseconds until the
response from the neighbor is received or the number of the sent NSs hits
MAX_UNICAST_SOLICIT(3).
?: Unknown state.
/R—indicate the neighbor is considered as a device/H: The neighbor is a host.
The reachable time of the neighbor. ’-‘ indicates that the neighbor is always

Agereachable. Note that the reachability of a static neighbor depends on the actual
situation. ’expired’ indicates that the lifetime of the neighbor expires, and theneighbor is waits for the triggering of NUD.

Asked

RelatedThe number of the NSs that are sent to the neighbor for the resolution of the linkaddress of the neighbor.

Command

Description

3-28

Command Reference

IPv6 Commands

Commands

ipv6 neighbor

Platform

N/A

Configures a neighbor.

Description

3.32 show ipv6 neighbors statistics
Use the following command to show the statistics of IPv6 neighbors.
show ipv6 neighbors statistics [ all ]Parameter

Parameter

Description

Description

all

Displays the statistics of all IPv6 neighbors.

Defaults

N/A

Command Mode

Privileged EXEC mode.

Usage Guide

N/A

Configuration

The following example displays the statistics of the global neighbors.

ExamplesRuijie# show ipv6 neighbor statistics
Memory: 0 bytes
Entries: 0
Static: 0,Dynamic: 0,Local: 0
Incomplete:0, Reachable:0, Stale:0, Delay:0, Probe:0

The following example displays the statistics of all IPv6 neighbors.
Ruijie# show ipv6 neighbor statistics all
IPv6 neighbor table count: 1
Static neighbor count: 0(0 active, 0 inactive)
Total
Memory: 0 bytes
Entries: 0
Static: 0,Dynamic: 0,Local: 0
Incomplete:0, Reachable:0, Stale:0, Delay:0, Probe:0;
GlobalMemory: 0 bytes
Entries: 0
Static: 0,Dynamic: 0,Local: 0
Incomplete:0, Reachable:0, Stale:0, Delay:0, Probe:0;

3-29

Command Reference

IPv6 Commands

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.33 show ipv6 packet statistics
Use this command to display the statistics of IPv6 packets.
show ipv6 packet statistics [ total | interface-name ]Parameter

Parameter

Description

Description

total

Displays total statistics of all interfaces.

interface-name

Interface nameDefaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays the total statistics of the IPv6 packets and the statistics of each

Examplesinerface.
Ruijie# show ipv6 pack statistics
Total
Received 0 packets, 0 bytes
Unicast:0,Multicast:0
Discards:0
HdrErrors:0(HoplimitExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 0 packets, 0 bytes
Unicast:0,Multicast:0
GigabitEthernet 0/17
Received 0 packets, 0 bytes
Unicast:0,Multicast:0
Discards:0
HdrErrors:0(HoplimitExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 0 packets, 0 bytes
Unicast:0,Multicast:0

3-30

Command Reference

IPv6 Commands

The following example displays the total statistics of the IPv6 packets.
Ruijie# show ipv6 pack statistics total
Total
Received 0 packets, 0 bytes
Unicast:0,Multicast:0
Discards:0
HdrErrors:0(HoplimitExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 0 packets, 0 bytes
Unicast:0,Multicast:0

RelatedCommand

Description

Commands

N/A

N/A

Platform

Supported on all platforms.

Description

3.34 show ipv6 raw-socket
Use this command to display all IPv6 raw sockets.
show ipv6 raw-socket [ num ]Parameter

Parameter

Description

Description

numProtocol.

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays all IPv6 raw sockets.

ExamplesRuijie# show ipv6 raw-socket
Number Protocol Process name1

ICMPv6

vrrp.elf

2

ICMPv6

tcpip.elf

3

VRRP

vrrp.elf

Total: 3

Field

Description

3-31

Command Reference

IPv6 Commands

NumberNumber.

ProtocolProtocol.

Process name

Process number.

Total

Total number of IPv6 raw sockets.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.35 show ipv6 routers
In the IPv6 network, some neighbor routers send out the advertisement messages. Use thiscommand to display the neighbor routers and the advertisement.
show ipv6 routers [ interface-type interface-number ]Parameter

Parameter

Description

Description

interface-type(Optional) Displays the routing advertisement of the specified

interface-number

interface.

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

Use this command to display the neighbor routers and the routing advertisement. If no interface is
specified, all the routing advertisement of this device will be displayed.

Configuration

The following example displays the IPv6 router

ExamplesRuijie# show ipv6 routers
Router FE80::2D0:F8FF:FEC1:C6E1 on VLAN 2, last update 62 sec
Hops 64, Lifetime 1800 sec, ManagedFlag=0, OtherFlag=0, MTU=1500
Preference=MEDIUM
Reachable time 0 msec, Retransmit time 0 msec
Prefix 6001:3::/64 onlink autoconfig
Valid lifetime 2592000 sec, preferred lifetime 604800 sec
Prefix 6001:2::/64 onlink autoconfig
Valid lifetime 2592000 seconds, preferred lifetime 604800 seconds

RelatedCommand

Description

Commands

N/A

N/A

3-32

Command Reference

Platform

IPv6 Commands

N/A

Description

3.36 show ipv6 sockets
Use this command to display all IPv6 sockets.
show ipv6 sockets

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays all IPv6 sockets.

ExamplesRuijie# show ipv6 sockets
Number Process name

Type

Protocol

LocalIP:Port ForeignIP:Port

State

1

vrrp.elf

RAW

ICMPv6

:::58

:::0

*

2

tcpip.elf

RAW

ICMPv6

:::58

:::0

*

3

vrrp.elf

RAW

VRRP

:::112:::0*

4

rg-snmpd

DGRAM UDP:::161:::0*

5

rg-snmpd

DGRAM UDP:::162:::0*6

dhcp6.elf

DGRAM UDP:::547:::0*

7

rg-sshd

STREAM TCP

:::22

:::0

LISTEN8

rg-telnetd

STREAM TCP

:::23

:::0

LISTEN

Total: 8

Field

Description

NumberNumber.

Process name

Process name.

Type

Socket type. RAW indicates the raw socket. DGRAM
indicates data packet type. STREAM indicates traffic type.

ProtocolProtocol number

LocalIP:Port

Local IPv6 address and port.

ForeignIP:Port

Peer IPv6 address and port.

StateState (for IPv6 TCP sockets).

3-33

Command Reference

IPv6 Commands

Total

Total number of sockets.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.37 show ipv6 udp
Use this command to display all IPv6 UDP sockets.
show ipv6 udp [ local-port num ] [ peer-port num ]Use this command to display IPv6 UDP socket statistics.
show ipv6 udp statistics

Parameter

Parameter

Description

Description

local-port num

Local port number.

peer-port num

Peer port number.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays all IPv6 UDP sockets.

ExamplesRuijie# show ipv6 udp
Number Local AddressPeer Address

Process name1:::161:::0

rg-snmpd

2:::162:::0

rg-snmpd

3:::547:::0dhcp6.elf

Filed

Description

NumberNumber.

Local Address

Local IPv6 address and port.

Peer AddressPeer IPv6 address and port.

Process name

Process name.

RelatedCommand

Description

Commands

N/A

N/A

3-34

Command Reference

Platform

IPv6 Commands

N/A

Description

3-35

Command Reference

DHCP Commands

4 DHCP Commands
4.1 address range
Use this command to specify the network segment range of the addresses that can be allocated by
CLASS associated with DHCP address pool. Use the no form of this command to restore the default
setting.
address range low-ip-address high-ip-addressno address range

Parameter

Parameter

Description

Description

low-ip-address

Start address in the network segment range.

high-ip-address

End address in the network segment range.

Defaults

By default, the associated CLASS is not configured with the network segment range. The default isthe address pool range.

CommandAddress pool CLASS configuration mode.

Mode

Usage Guide

Each CLASS corresponds to one network range which must be from low address to high address, so
as to allow the duplication of network segment range between multiple CLASSes. If the CLASS
associated with the address pool is specified without configuring the corresponding network segment
range, the default network segment range of this CLASS is same as the range of the address poolwhere this CLASS is.

Configuration

The following example configures the network segment of class1 associated with address pool

Examplesmypool0 ranging from 172.16.1.1 to 172.16.1.8.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# class class1
Ruijie(config-dhcp-pool-class)# address range 172.16.1.1 172.16.1.8

RelatedCommands

Commandip dhcp pool

class

Platform

Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
Configures the CLASS associated with the DHCP address pool andenters the address pool CLASS configuration mode.

N/A

Description

4-1

Command Reference

DHCP Commands

4.2 bootfile
Use this command to define the startup mapping file name of the DHCP client. Use the no or default
form of this command to restore the default setting.
bootfile file-nameno bootfile
default bootfile

Parameter

Parameter

Description

Description

file-nameStartup file name.

Defaults

No startup file name is defined by default.

Command

DHCP address pool configuration mode

Mode

Usage Guide

Some DHCP clients need to download the operating system and configure the file during the startup.
The DHCP server should provide the mapping file name required for the startup, so that DHCP clientscan download the file from the corresponding server (such as TFTP). Other servers are defined by
the next-server command.

Configuration

The following example defines the device.conf as the startup file name.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# bootfile device.conf

RelatedCommands

Commandip dhcp poolnext-server

Platform

Description
Defines the name of the DHCP address pool and enter the DHCP address poolconfiguration mode.
Configures the next server IP address of the DHCP client startup process.

N/A

Description

4.3 class
Use this command to configure the associated CLASS in the DHCP address pool. Use the no form of
this command to restore the default setting.
class class-nameno classParameter

Parameter

Description

Description

class-nameClass name, which can be the character string or numeric such as myclass or 1.

4-2

Command Reference

DHCP Commands

Defaults

By default, no CLASS is associated with the address pool.

Command

DHCP address pool configuration mode

Mode

Usage Guide

Each DHCP address pool performs the address assignment according to the Option82 matching
information. We can divide this Option82 information into classes and specify the available network
segment range for these classes in the DHCP address pool. These classes are called CLASS. One
DHCP address pool can map to multiple CLASSes, and each CLASS can specify different network
segment range.
During the address assignment, firstly, ensure the assignable address pool through the network
segment where the client is, then according to the Option82 information further ensure the CLASS
and assign the IP address from the network segment range corresponding to the CLASS. If one
request packet matches multiple CLASSes in the address pool, perform the address assignment
according to the sequencing of configuring the CLASS in the address pool. If this CLASS’s assigned
addresses have been to the upper limit, then continue to assign the address from the next CLASS,
and so on. Each CLASS corresponds to one network segment range that must be from low
addresses to high addresses and the duplicated network ranges between multiple CLASSes areallowed. If the CLASS corresponding to the address pool is specified and the network segment
corresponding to the CLASS is not configured, this CLASS’s default network segment range is sameas the range of address pool where the CLASS is.

Configuration

The following example configures the address mypool0 to associate with class1.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# class class1

RelatedCommands

Platform

Commandip dhcp pool

Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.

N/A

Description

4.4 clear ip dhcp binding
Use this command to clear the DHCP binding table in the privileged user mode.
clear ip dhcp binding { * | ip-address }Parameter

Parameter

Description

Description*

Deletes all DHCP bindings.

ip-address

Deletes the binding of the specified IP addresses.

Defaults

N/A.

4-3

Command Reference

Command

DHCP Commands

Privileged EXEC mode.

Mode

Usage Guide

This command can only clear the automatic DHCP binding, but the manual DHCP binding can bedeleted by the no ip dhcp pool command.

Configuration

The following example clears the DHCP binding with the IP address 192.168.12.100.

ExamplesRuijie# clear ip dhcp binding 192.168.12.100

RelatedCommand

Description

Commands

show ip dhcp binding

Displays the address binding of the DHCP server.

Platform

N/A

Description

4.5 clear ip dhcp conflict
Use this command to clear the DHCP address conflict record.
clear ip dhcp conflict { * | ip-address }Parameter

Parameter

Description

Description*

Deletes all DHCP address conflict records.

ip-address

Deletes the conflict record of the specified IP addresses.

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

Usage Guide

The DHCP server uses the ping session to detect the address conflict, while the DHCP client uses
the address resolution protocol (ARP) to detect the address conflict. The clear ip dhcp conflictcommand can be used to delete the history conflict record.

Configuration

The following example clears all address conflict records.

ExamplesRuijie# clear ip dhcp conflict *RelatedCommandCommands

Description
Defines the number of the data packets sent by the ping operation for

ip dhcp ping packets

the detection of the address conflict when the DHCP server assigns an
IP address.

show ip dhcp conflict

Displays the address conflict that the DHCP server detects when it
assigns an IP address.

4-4Command Reference

Platform

DHCP Commands

N/A

Description

4.6 clear ip dhcp history
Use this command to clear the address assigned by the DHCP server.
clear ip dhcp history { * | mac-address }Parameter

Parameter

Description

Description*

Clears all addresses assigned by the DHCP server.

mac-address

Defaults

N/A

CommandPrivileged EXEC mode

Clears the address assigned by the DHCP server corresponding to
the specified MAC address.

Mode

Usage Guide

This command is configured on the DHCP server.

Configuration

The following example clears all addresses assigned by the DHCP server.

ExamplesRuijie# clear ip dhcp history *RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.7 clear ip dhcp relay statistics
Use this command to clear the DHCP relay statistics.
clear ip dhcp relay statistics

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

The DHCP relay is configured with the counter to count various packets received or transmitted by

4-5

Command Reference

DHCP Commands

the relay. This command is used to clear the counters.

Configuration

The following example clears the DHCP relay statistics.

ExamplesRuijie# clear ip dhcp relay statistics

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.8 clear ip dhcp server rate
Use this command to clear statistics about the packet processing rate of every module.
clear ip dhcp server rate

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to clear statistics about the packet processing rate of every module, including
arp, hot backup, lsm, and socket.

Configuration

The following example clears statistics about the packet processing rate of every module.

ExamplesRuijie# clear ip dhcp server rate

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.9 clear ip dhcp server statistics
Use this command to reset the counter of the DHCP server in the privileged user mode.
clear ip dhcp server statistics

Parameter

Parameter

Description

Description

N/A

N/A

4-6

Command Reference

Defaults

N/A

CommandPrivileged EXEC mode.

DHCP Commands

Mode

Usage Guide

The DHCP server carries out the statistics counter, records the DHCP address pool, automatic
binding, manual binding and expired binding. Furthermore, it also carries out the statistics to thenumber of sent and received DHCP messages. The clear ip dhcp server statistics command canbe used to delete the history counter record and carry out the statistics starting from scratch.

Configuration

The following example clears the statistics record of the DHCP server.

ExamplesRuijie# clear ip dhcp server statistics

RelatedCommand

Description

Commands

show ip dhcp server statistics

Displays the statistics record of the DHCP server.

Platform

N/A

Description

4.10 client-identifier
Use this command to define the unique ID of the DHCP client (indicated in hex, separated by dot) in the
DHCP address pool configuration mode. Use the no form of this command to restore the default
setting.
client-identifier unique-identifier
no client-identifier

Parameter
Description

Parameter
unique-identifier

Description
The DHCP client ID is indicated in hex and separated by dot, for instance,
0100.d0f8.2233.b467.6967.6162.6974.4574.6865.726e.6574.302f.31.

Defaults

N/A.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

When some DHCP clients request the DHCP server to assign IP addresses, they use their client IDs
rather than their hardware addresses. The client ID consists of media type, MAC addresses andinterface name. For instance, the MAC address is 00d0.f822.33b4, the interface name is
GigabitEthernet 0/17, and the corresponding client ID is
0100.d0f8.2233.b467.6967.6162.6974.4574.6865.726e.6574.302f.31, where, 01 denotes the type of
the Ethernet media.
The 67.6967.6162.6974.4574.6865.726e.6574.302f.31 is the hex code of GigabitEthernet0/17. For the

4-7Command Reference

DHCP Commands

definition of the media code, refer to the Address Resolution Protocol Parameters section in RFC1700.
This command is used only when the DHCP is defined by manual binding.

Configuration

The following example defines the client ID of the Ethernet DHCP client whose MAC address is

Examples

00d0.f822.33b4.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# client-identifier
0100.d0f8.2233.b467.6967.6162.6974.4574.6865.726e.6574.302f.31

RelatedCommand

Description

Commands

hardware-address

Defines the hardware address of DHCP client.

host

ip dhcp pool

Platform

Defines the IP address and network mask, which is used to configure the
DHCP manual binding.
Defines the name of the DHCP address pool and enters the DHCP addresspool configuration mode.

N/A

Description

4.11 client-name
Use this command to define the name of the DHCP client in the DHPC address pool configuration
mode. Use the no form of this command to restore the default setting.
client-name client-nameno client-nameParameter

Parameter

Description

Description
Name of DHCP client, a set of standards-based ASCII

client-namecharacters. The name should not include the suffix domainname. For instance, you can define the name of the DHCP
client as river, not river.i-net.com.cn.

Defaults

No client name is defined by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

This command can be used to define the name of the DHCP client only when the DHCP is defined bymanual binding. This name should not include the suffix domain name.

Configuration

The following example defines a string river as the name of the client.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# client-name river

4-8

Command Reference

RelatedCommands

Commandhost

ip dhcp pool

Platform

DHCP Commands

Description
Defines the IP address and network mask, which is used toconfigure the DHCP manual binding.
Defines the name of the DHCP address pool and enters the
DHCP address pool configuration mode.

N/A

Description

4.12 default-router
Use this command to define the default gateway of the DHCP client in the DHPC address poolconfiguration mode. Use the no form of this command to restore the default setting.
default-router ip-address [ ip-address2…ip-address8 ]no default-router

Parameter
Description

Parameter
ip-address
ip-address2…ip-address8

Description
Defines the IP address of the equipment. It is required toconfigure one IP address at least.
(Optional) Up to 8 gateways can be configured.

Defaults

No gateway is defined by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

In general, the DHCP client should get the information of the default gateway from the DHCP server.
The DHCP server should specify one gateway address for the client at least, and this address should
be of the same network segment as the address assigned to the client.

Configuration

The following example defines 192.168.12.1 as the default gateway.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# default-router 192.168.12.1

RelatedCommandCommands
ip dhcp pool

Platform

Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.

N/A

Description

4-9

Command Reference

DHCP Commands

4.13 dns-server
Use this command to define the DNS server of the DHCP client in the DHPC address poolconfiguration mode. Use the no form of this command to restore the default setting.
dns-server { ip-address [ ip-address2…ip-address8 ] | use-dhcp-client interface-type
interface-number }no dns-server

Parameter
Description

Parameter

Description
Defines the IP address of the DNS server. At least one IP address

ip-address

should be configured.

ip-address2…ip-address8(Optional) Up to 8 DNS servers can be configured.

use-dhcp-client interface-type

Uses the DNS server learned by the DHCP client of the RGOS

interface-number

software as the DNS server of the DHCP client.

Defaults

No DNS server is defined by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

When more than one DNS server is defined, the former will possess higher priory, so the DHCP client
will select the next DNS server only when its communication with the former DNS server fails.
If the RGOS software also acts as the DHCP client, the DNS server information obtained by the client
can be transmitted to the DHCP client.

Configuration

The following example specifies the DNS server 192.168.12.3 for the DHCP client.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# dns-server 192.168.12.3

RelatedCommand

Description

Commands

domain-nameDefines the suffix domain name of the DHCP client.

ip address dhcp

Enables the DHCP client on the interface to obtain the IP address information.

ip dhcp pool

Platform

Defines the name of the DHCP address pool and enters the DHCP addresspool configuration mode.

N/A

Description

4.14 domain-name
Use this command to define the suffix domain name of the DHCP client in the DHPC address poolconfiguration mode. Use the no form of this command to restore the default setting.
domain-name domain-name

4-10

Command Reference

DHCP Commands

no domain-nameParameter

Parameter

Description

Description

domain-nameDefines the suffix domain name string of the DHCP client.

Defaults

No suffix domain name by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

After the DHCP client obtains specified suffix domain name, it can access a host with the same suffix
domain name by the host name directly.

Configuration

The following example defines the suffix domain name i-net.com.cn for the DHCP client.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# domain-name ruijie.com.cn

RelatedCommand

Description

Commands

dns-server

Defines the DNS server of the DHCP client.

ip dhcp pool

Platform

Defines the name of the DHCP address pool and enter the DHCP addresspool configuration mode.

N/A

Description

4.15 hardware-address
Use this command to define the hardware address of the DHCP client in the DHCP address poolconfiguration mode. Use the no form of this command to restore the default setting.
hardware-address hardware-address [ type ]no hardware-address

Parameter

Parameter

Description

Description

hardware-address

Defines the MAC address of the DHCP client.
Indicates the hardware platform protocol of the DHCP client. It uses
the string definition or digits definition.
String option:

type

Ethernet
ieee802
Digits option:
1 (10M Ethernet)
6 (IEEE 802)4-11Command Reference

Defaults

DHCP Commands

No hardware address is defined by default.
If there is no option when the hardware address is defined, it is the Ethernet by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

This command can be used only when the DHCP is defined by manual binding.

Configuration

The following example defines the MAC address 00d0.f838.bf3d with the type ethernet.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# hardware-address 00d0.f838.bf3d

RelatedCommands

Commandclient-identifier

host

ip dhcp pool
default-router

Platform

Description
Defines the unique ID of the DHCP client (Indicated by thehexadecimal numeral, separated by dot).
Defines the IP address and network mask, which is used to configure
the DHCP manual binding.
Defines the name of the DHCP address pool and enter the DHCP
address pool configuration mode.
Defines the default route of the DHCP client.

N/A

Description

4.16 hostUse this command to define the IP address and network mask of the DHCP client host in the DHCP
address pool configuration mode. Use the no form of this command to restore the default setting.
host ip-address [ netmask ]no hostParameter

Parameter

Description

Description

ip-address

Defines the IP address of DHCP client.

netmaskDefines the network mask of DHCP client.

Defaults

No IP address or network mask of the host is defined.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

If the network mask is not defined definitely, the DHCP server will use the natural network mask ofthis IP address: 255.0.0.0 for class A IP address, 255.255.0 for class B IP address, and
255.255.255.0 for class C IP address.

4-12Command Reference

DHCP Commands

This command can be used only when the DHCP is defined by manual binding.

Configuration

The following example sets the client IP address as 192.168.12.91, and the network mask as

Examples

255.255.255.240.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# host 192.168.12.91 255.255.255.240

RelatedCommands

Command

Description
Defines the unique ID of the DHCP client (Indicated in hex andclient-identifier

separated by dot).
Defines the hardware address of DHCP client.

hardware-address

Defines the name of the DHCP address pool and enters theip dhcp pool

default-router

Platform

DHCP address pool configuration mode.

Define the default route of thedefault-router

DHCP client.

N/A

Description

4.17 ip address dhcp
Use this command to make the Ethernet interface or the PPP, HDLC and FR encapsulated interface
obtain the IP address information by the DHCP in the interface configuration mode. Use the no formof this command to restore the default setting.
ip address dhcp
no ip address dhcp

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The interface cannot obtain the ID address by the DHCP by default.

Command

Interface configuration mode.

Mode

Usage Guide

When requesting the IP address, the DHCP client of the RGOS software also requires the DHCP
server provide 5 configuration parameter information: 1) DHCP option 1, client subnet mask, 2)
DHCP option 3, it is the same as the gateway information of the same subnet, 3) DHCP option 6, theDNS server information, 4) DHCP option 15, the host suffix domain name, and 5) DHCP option 44,
the WINS server information (optional).
The client of the RGOS software is allowed to obtain the address on the PPP, FR or HDL link by the
DHCP, which should be supported by the server. At present, our server can support this function.

4-13

Command Reference

DHCP Commands

Configuration

The following example makes the FastEthernet 0 port obtain the IP address automatically.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1) ip address dhcp

RelatedCommand

Description

Commands

dns-server

Defines the DNS server of DHCP client.
Defines the name of the DHCP address pool and enters the DHCP

ip dhcp pool

Platform

address pool configuration mode.

N/A

Description

4.18 ip dhcp class
Use this command to define a CLASS and enter the global CLASS configuration mode. Use the noform of this command to restore the default setting.
ip dhcp class class-nameno ip dhcp class class-nameParameter

Parameter

Description

Description

class-nameClass name, which can be character string or numeric such as myclass or 1.

Defaults

By default, the class is not configured.

Command

Global configuration mode.

Mode

Usage Guide

After executing this command, it enters the global CLASS configuration mode which is shown as“Ruijie (config-dhcp-class)#”. In this configuration mode, user can configure the Option82 informationthat matches the CLASS and the CLASS identification information.

Configuration

The following example configures a global CLASS.

ExamplesRuijie(config)# ip dhcp class myclass

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.19 ip dhcp excluded-address
Use this command to define some IP addresses and make the DHCP server not assign them to the

4-14Command Reference

DHCP Commands

DHCP client in the global configuration mode. Use the no form of this command to restore the default
setting.
ip dhcp excluded-address low-ip-address [ high-ip-address ]no ip dhcp excluded-address low-ip-address [ high-ip-address ]Parameter
Description

Parameter
low-ip-address
high-ip-address

Description
Excludes the IP address, or excludes the start IP address within the rangeof the IP address.
Excludes the end IP address within the range of the IP address.

Defaults

The DHCP server assigns the IP addresses of the whole address pool by default.

Command

Global configuration mode.

Mode

Usage Guide

If the excluded IP address is not configured, the DHCP server attempts to assign all IP addresses inthe DHCP address pool. This command can reserve some IP addresses for specific hosts to preventthese addresses are assigned to the DHCP client, and define the excluded IP address accurately to
reduce the conflict detecting time when the DHCP server assigns the address.

Configuration

In the following example, the DHCP server will not attempt to assign the IP addresses within

Examples

192.168.12.100~150.
Ruijie(config)# ip dhcp excluded-address 192.168.12.100 192.168.12.150

RelatedCommands

Commandip dhcp pool

network (DHCP)

Platform

Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
Defines the network number and network mask of the DHCP address
pool.

N/A

Description

4.20 ip dhcp force-send-nak
Use this command to configure the forcible NAK packet sending function. Use the no or default formof this command to restore the default setting.
ip dhcp force-send-nak
no ip dhcp force-send-nak
default ip dhcp force-send-nak

Parameter

Parameter

Description

Description

N/A

N/A

4-15

Command Reference

DHCP Commands

Defaults

This function is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

The DHCP client checks the previously used IP address every time it is started and sends a
DHCPREQUEST packet to continue leasing this IP address. If the address is not available, the DHCP
server sends an NAK packet to let the client resend a DHCPDISCOVER packet to apply for a new IP
address. If no corresponding lease record can be found on the server, the client keeps sending
DHCPDISCOVER packets. The forcible NAK packet sending function is added to shorten the interval
at which the client sends DHCPDISCOVER packets.

Configuration

The following example enables the forcible NAK packet sending function in global configuration

Examplesmode.
Ruijie(config)# ip dhcp force-send-nak

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.21 ip dhcp monitor-vrrp-state
Use this command in layer-3 configuration mode to enable the DHCP Server to monitor the status of
VRRP interfaces so that the DHCP Server processes only those packets sent from a VRRP interface
in the Master state. Use the no form of this command to restore the default setting. If it is canceled,the DHCP Server processes packets from VRRP interfaces in the Master or Backup state.
ip dhcp monitor-vrrp-state
no ip dhcp monitor-vrrp-stateParameter

Parameter

Description

Description

N/A

N/A

Defaults

The ip dhcp monitor-vrrp-state command is disabled by default. .

Command

Layer-3 interface configuration mode.

Mode

Usage Guide

If a VRRP address is configured for an interface, the DHCP Server processes packets sent from themaster interface and discards packets sent from the backup interface. If no VRRP address isconfigured, the DHCP Server does not monitor the status of VRRP interfaces. All DHCP packets will
be processed.

4-16

Command Reference

DHCP Commands

Configuration

The following example enables the DHCP Server to monitor the status of VRRP interfaces.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1) ip dhcp monitor-vrrp-state

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.22 ip dhcp ping packets
Use this command to configure the times of pinging the IP address when the DHCP server detects
address conflict in the global configuration mode. Use the no form of this command to restore thedefault setting.
ip dhcp ping packets [ number ]no ip dhcp ping packets

Parameter
Description

Parameter
numberDescription(Optional) Number of packets in the range of 0 to 10, where 0 indicates disabling
the ping operation. The Ping operation sends two packets by default.

Defaults

The Ping operation sends two packets by default.

Command

Global configuration mode.

Mode

Usage Guide

When the DHCP server attempts to assign the IP address from the DHCP address pool, use the ping
operation to check whether this address is occupied by other hosts. Record it if the address is
occupied, otherwise, assign it to the DHCP client. The Ping operation will send up to 10 packets, twopackets by default.

Configuration

The following example sets the number of the packets sent by the ping operation as 3.

ExamplesRuijie(config)# ip dhcp ping packets 3

RelatedCommand

Description

Commands

clear ip dhcp conflict

Clears the DHCP history conflict record.
Configures the timeout time that the DHCP server waits for the Ping

ip dhcp ping packet

response. If all the ping packets are not responded within thespecified time, it indicates that this IP address can be assigned.
Otherwise, it will record the address conflict.

show ip dhcp conflict

Displays the DHCP server detects address conflict when it assigns

4-17Command Reference

DHCP Commands

an IP address.

Platform

N/A

Description

4.23 ip dhcp ping timeout
Use this command to configure the timeout that the DHCP server waits for response when it uses theping operation to detect the address conflict in the global configuration mode. Use the no form of thiscommand to restore the default setting.
ip dhcp ping timeout milli-seconds
no ip dhcp ping timeout

Parameter
Description

Parameter
milli-seconds

Defaults

The default is 500 seconds.

Command

Global configuration mode.

Description
Time that the DHCP server waits for ping response in the range 100
to 10000 milliseconds.

Mode

Usage Guide

This command defines the time that the DHCP server waits for a ping response packet.

Configuration

The following example configures the waiting time of the ping response packet to 600ms.

ExamplesRuijie(config)# ip dhcp ping timeout 600

RelatedCommand

Description

Commands

clear ip dhcp conflict

Clears the DHCP history conflict record.
Defines the number of the data packets sent by the ping operation for

ip dhcp ping packets

the detection of the address conflict when the DHCP server assigns
an IP address.

show ip dhcp conflict

Platform

Displays the address conflict the DHCP server detects when it
assigns an IP address.

N/A

Description

4.24 ip dhcp pool
Use this command to define a name of the DHCP address pool and enter the DHCP address poolconfiguration mode in the global configuration mode. Use the no form of this command to restore thedefault setting.

4-18

Command Reference

DHCP Commands

ip dhcp pool pool-nameno ip dhcp pool pool-nameParameter

Parameter

Description

Description

pool-name

A string of characters and positive integers, for instance, mypool or 1.

Defaults

No DHCP address pool is defined by default.

Command

Global configuration mode.

Mode

Usage Guide

Execute the command to enter the DHCP address pool configuration mode:
Ruijie(dhcp-config)#
In this configuration mode, configure the IP address range, the DNS server and the default gateway.

Configuration

The following example defines a DHCP address pool named mypool0.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)#

RelatedCommands

Commandhost

ip dhcp excluded-address

network (DHCP)

Platform

Description
Defines the IP address and network mask, which is used to configure
the DHCP manual binding.
Defines the IP addresses that the DHCP server cannot assign to theclients.
Defines the network number and network mask of the DHCP address
pool.

N/A

Description

4.25 ip dhcp relay check server-id
Use this command to enable the ip dhcp relay check server-id function. Use the no form of thiscommand to restore the default setting.
ip dhcp relay check server-id
no ip dhcp relay check server-id

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The ip dhcp relay check server-id command is disabled.

4-19

Command Reference

Command

DHCP Commands

Global configuration mode.

Mode

Usage Guide

Switch will select the server to be sent according to server-id option when forwarding DHCP
REQUEST via this command. Without this command configured, the switch forwards the DHCP
REQUEST to all configured DHCP servers.

Configuration

The following example enables the ip dhcp relay check server-id function.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp relay check server-id

RelatedCommand

Description

Commands

service dhcp

Enables the DHCP Relay.

Platform

N/A

Description

4.26 ip dhcp relay information option82
Use this command to enable the ip dhcp relay information option82 function. Use the no form of
this command to restore the default setting.
ip dhcp relay information option82
no ip dhcp relay information option82

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The ip dhcp relay information option82 command is disabled.

Command

Global configuration mode.

Mode

Usage Guide

This command is exclusive with the option dot1x command.

Configuration

The following example enables the option82 function on the DHCP relay.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp relay information option82

RelatedCommand

Description

Commands

service dhcp

Enables the DHCP Relay.

Platform

N/A

Description

4-20

Command Reference

DHCP Commands

4.27 ip dhcp relay suppression
Use this command to enable the DHCP binding globally. Use the no form of this command to disable
the DHCP binding globally and enable the DHCP relay suppression on the port.
ip dhcp relay suppression
no ip dhcp relay suppression

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The ip dhcp relay suppression command is disabled.

Command

Interface configuration mode.

Mode

Usage Guide

After executing this command, the system will not relay the DHCP request message on the interface.

Configuration

The following example enables the relay suppression function on the interface 17.

ExamplesRuijie# configure terminal
Ruijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1) ip dhcp relay suppression

RelatedCommand

Description

Commands

service dhcp

Enables the DHCP Relay.

Platform

N/A

Description

4.28 ip dhcp use class
Use this command to enable the CLASS to allocate addresses in the global configuration mode. Use
the no form of this command can be used to disable the CLASS.
ip dhcp use classno ip dhcp use classParameter

Parameter

Description

Description

N/A

N/A

Defaults

EnabledCommandThis function is enabled by defualt.

Mode

4-21

Command Reference

DHCP Commands

Usage Guide

N/A

Configuration

The following example enables the CLASS to allocate addresses.

ExamplesRuijie(config)# ip dhcp use class

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.29 ip helper-address
Use this command to add an IP address of the DHCP server. Use the no form of this command todelete an IP address of the DHCP server.
The server address can be configured globally or on a specific interface. Therefore, this command
can run in the global configuration mode or the interface configuration mode to add the DHCP server
information.
ip helper-address { cycle-mode | A.B.C.D }no ip helper-address { cycle-mode | A.B.C.D }Parameter

Parameter

Description

Description

cycle-mode

Forwards the DHCP request packets to all DHCP servers.

A.B.C.D

DHCP server IP address

Defaults

N/A

Command

Global configuration mode, interface configuration mode.

Mode

Usage Guide

Up to 20 DHCP server IP addresses can be configured globally or on a layer-3 interface.
One DHCP request of this interface will be sent to these servers. You can select one for confirmation.

Configuration

The following example sets the IP address for the global server to 192.168.1.1

ExamplesRuijie# configure terminal
Ruijie(config)# ip helper-address 192.168.1.1

RelatedCommand

Description

Commands

service dhcp

Enables the DHCP relay.

Platform

N/A

Description

4-22

Command Reference

DHCP Commands

4.30 lease
Use this command to define the lease time of the IP address that the DHCP server assigns to theclient in the DHCP address pool configuration mode. Use the no form of this command to restore thedefault setting. A limited lease time ranges from 1 minute to 23 hours and 59 minutes.
lease { days [ hours ] [ minutes ] | infinite }no lease

Parameter

Parameter

Description

Description

days

Lease time in days

hours

minutes
infinite(Optional) Lease time in hours. It is necessary to define the days
before defining the hours.
(Optional) Lease time in minutes. It is necessary to define the days
and hours before defining the minutes.
Infinite lease time.

Defaults

The lease time for a static address pool is infinite. The lease time for other address pools is 1 day.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

When the lease is getting near to expire, the DHCP client will send the request of renewal of lease. In
general, the DHCP server will allow the renewal of lease of the original IP address.

Configuration

The following example sets the DHCP lease to 1 hour.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# lease 0 1

The following example sets the DHCP lease to 1 minute.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# lease 0 0 1

RelatedCommands

Platform

Commandip dhcp pool

Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.

N/A

Description

4-23

Command Reference

DHCP Commands

4.31 lease-threshold
Use this command in DHCP address pool configuration mode to define the DHCP alarm threshold.
Use the default or no form of this command to restore the default setting.
lease-threshold percentage
defaut lease-thresholdno lease-threshold

Parameter

Parameter

Description

Description

percentage

Usage of the address pool, ranging from 60 to 100 in percentage.

Defaults

90

Command

DHCP address pool configuration mode.

Mode

Usage Guide

If the maximum IP usage of the address pool reaches the threshold, the DHCP Server generates a
SYSLOG alarm. The IP usage indicates the ratio of the number of assigned address pools to the total
number of assignable address pools. If the number of assigned pools stays above the alarm
threshold, an alarm is generated every 5 minutes.

Configuration

The following example sets the alarm threshold to 80%.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# lease-threshold 80

The following example restores the default alarm threshold.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# default lease-threshold

The following example disables the address pool alarm function.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# no lease-threshold

RelatedCommands

Platform

Commandip dhcp pool

Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.

N/A

Description

4-24

Command Reference

DHCP Commands

4.32 netbios-name-server
Use this command to configure the WINS name server of the Microsoft DHCP client NETBIOS in the
DHCP address pool configuration mode. The no form of this command can be used to restore thedefault setting.
netbios-name-server ip-address [ ip-address2…ip-address8 ]netbios-name-server

Parameter
Description

Parameter
ip-address

ip-address2…ip-address8

Description
IP address of the WINS server. It is required to configure one IP
address at least.
(Optional) IP addresses of WINS servers. Up to 8 WINS servers canbe configured.

Defaults

No WINS server is defined by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

When more than one WINS server is defined, the former has higher priory. The DHCP client will
select the next WINS server only when its communication with the former WINS server fails.

Configuration

The following example specifies the WINS server 192.168.12.3 for the DHCP client.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# netbios-name-server 192.168.12.3

RelatedCommand

Description

Commands

ip address dhcp

Enables the DHCP client on the interface to obtain the IP address.

ip dhcp pool
netbios-node-type

Platform

Defines the name of the DHCP address pool and enter the DHCP
address pool configuration mode.
Defines the netbios node type of the client host.

N/A

Description

4.33 netbios-node-type
Use this command to define the node type of the master NetBIOS of the Microsoft DHCP client in the
DHCP address configuration mode. Use the no form of this command to restore the default setting.
netbios-node-type typeno netbios-node-type

4-25

Command Reference

Parameter

Parameter

Description

DHCP Commands

Description
Type of node in two modes:
Digit in hexadecimal form in the range of 0 to FF. Only the following
numerals are available:
1: b-node.
2: p-node.

type

4: m-node.
8: h-node.
String:b-node: broadcast node
p-node: peer-to-peer node
m-node: mixed node
h-node: hybrid nodeDefaults

No type of the NetBIOS node is defined by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

There are 4 types of the NetBIOS nodes of the Microsoft DHCP client: 1) Broadcast, which carries out
the NetBIOS name resolution by the broadcast method, 2) Peer-to-peer, which directly requests the
WINS server to carry out the NetBIOS name resolution, 3) Mixed, which requests the name resolution
by the broadcast method firstly, and then carry out the name resolution by the WINS serverconnection, 4) Hybrid, which requests the WINS server to carry out the NetBIOS name resolution
firstly, and it will carry out the NetBIOS name resolution by the broadcast method if the response is
not received.
By default, the node type for Microsoft operating system is broadcast or hybrid. If the WINS server is
not configured, broadcast node is used. Otherwise, hybrid node is used. It is recommended to set thetype of the NetBIOS node as Hybrid.

Configuration

The following example sets the NetBIOS node of Microsoft DHCP client as Hybrid.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# netbios-node-type h-node

RelatedCommands

Commandip dhcp pool

netbios-name-server

Platform

Description
Defines the name of DHCP address pool and enters the DHCP
address pool configuration mode.
Configures the WINS name server of the Microsoft DHCP client
NETBIOS.

N/A

Description

4-26

Command Reference

DHCP Commands

4.34 network (DHCP)
Use this command to define the network number and network mask of the DHCP address pool in the
DHCP address pool configuration mode. Use the no form of this command to restore the default
setting.
network net-number net-mask
no network

Parameter

Parameter

Description

Description

net-number

Network number of the DHCP address pool

net-mask

Network mask of the DHCP address pool. If the network mask is notdefined, the natural network mask will be used by default.

Defaults

No network number or network mask is defined by default.

Command

DHCP address pool configuration mode.

Mode

Usage Guide

This command defines the subnet and subnet mask of a DHCP address pool, and provides the DHCP
server with an address space which can be assigned to the clients. Unless excluded addresses are
configured, all the addresses of the DHCP address pool can be assigned to the clients. The DHCP
server assigns the addresses in the address pool orderly. If the DHCP server found an IP address isin the DHCP binding table or in the network segment, it checks the next until it assigns an effective IP
address.
The show ip dhcp binding command can be used to view the address assignment, and the show ip
dhcp conflict command can be used to view the address conflict detection configuration.

Configuration

The following example defines the network number of the DHCP address pool as 192.168.12.0, andExamplesthe network mask as 255.255.255.240.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# network 192.168.12.0 255.255.255.240

RelatedCommands

Commandip dhcp excluded-address

ip dhcp pool

Platform

Description
Defines the IP addresses that the DHCP server cannot assign to theclients.
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.

N/A

Description

4-27

Command Reference

DHCP Commands

4.35 next-server
Use this command to define the startup sever list that the DHCP client accesses during startup in the
DHCP address configuration mode. Use the no form of this command to restore the default setting.
next-server ip-address [ ip-address2…ip-address8 ]no next-server

Parameter
Description

Parameter
ip-address
ip-address2…ip-address8

Description
Defines the IP address of the startup server, which is usually the
TFTP server. It is required to configure one IP address at least.
(Optional) Up to 8 startup servers can be configured.

Defaults

N/A

Command

DHCP address pool configuration mode.

Mode

Usage Guide

When more than one startup server is defined, the former will possess higher priory. The DHCP client
will select the next startup server only when its communication with the former startup server fails.

Configuration

The following example specifies the startup server 192.168.12.4 for the DHCP client.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# next-server 192.168.12.4

RelatedCommand

Description

Commands

bootfile

Defines the default startup mapping file name of the DHCP client.

ip dhcp pool

Platform

Defines the name of the DHCP address pool and enter the DHCP
address pool configuration mode.

ip help-address

Defines the Helper address on the interface.

optionConfigures the option of the RGOS software DHCP server.

N/A

Description

4.36 option
Use this command to configure the option of the DHCP server in the DHCP address poolconfiguration mode. Use the no form of this command to restore the default setting.
option code { ascii string | hex string | ip ip-address }no option

4-28

Command Reference

Parameter
Description

DHCP Commands

Parameter

Description

code

Defines the DHCP option codes.

ascii string

Defines an ASCII string.

hex string

Defines a hex string.

ip ip-address

Defines an IP address list.

Defaults

N/A

Command

DHCP address pool configuration mode.

Mode

Usage Guide

The DHCP provides a mechanism to transmit the configuration information to the host in the TCP/IP
network. The DHCP message has a variable option field that can be defined according to the actual
requirement. The DHCP client needs to carry the DHCP message with 32 bytes of option information
at least. Furthermore, the fixed data field in the DHCP message is also referred to as an option. For
the definition of current DHCP option, refer to RFC 2131.

Configuration

The following example defines the option code 19, which determines whether the DHCP client can

Examplesenable the IP packet forwarding. 0 indicates to disable the IP packet forwarding, and 1 indicates toenable the IP packet forwarding. The configuration below enable the IP packet forwarding on the
DHCP client.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# option 19 hex 1

The following example defines the option code 33, which provides the DHCP client with the static
route information. The DHCP client will install two static routes: 1) the destination network
172.16.12.0 and the gateway 192.168.12.12, 2) the destination network 172.16.16.0 and the gateway
192.168.12.16.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# option 33 ip 172.16.12.0 192.168.12.12 172.16.16.0
192.168.12.16

RelatedCommands

Platform

Commandip dhcp pool

Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.

N/A

Description

4-29

Command Reference

DHCP Commands

4.37 pool-status
Use this command to enable or disable the DHCP address pool.
pool-status { enable | disable }Parameter

Parameter

Description

Description

enableEnables the address pool.

disableDisables the address pool.

Defaults

By default, the address pool is enabled after it is configured.

Command

DHCP address pool configuration mode

Mode

Usage Guide

This command is configured on the DHCP server.

Configuration

The following example disables the address pool.

ExamplesRuijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# pool-status disable

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.38 relay agent information
Use this command to enter the Option82 matching information configuration mode in the global
CLASS configuration mode. Use the no form of this command to delete the Option82 matching
information of the CLASS.
relay agent information
no relay agent information

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

Command

Global CLASS configuration mode

Mode

Usage Guide

After executing this command, it enters the Option82 matching information configuration mode which

4-30

Command Reference

DHCP Commands

is shown as “Ruijie (config-dhcp-class-relayinfo)#”.
In this configuration mode, user can configure the class matching multiple Option82 information.

Configuration

The following example configures a global CLASS and enters the Option82 matching information

Examplesconfiguration mode.
Ruijie(config)# ip dhcp class myclass
Ruijie(config-dhcp-class)# relay agent information
Ruijie(config-dhcp-class-relayinfo)#

RelatedCommand

Description

Commands

ip dhcp class

Defines a CLASS and enters the global CLASS configuration mode.

Platform

N/A

Description

4.39 relay-information hex
Use this command to enter the Option82 matching information configuration mode. Use the no formof this command to delete a piece of matching information.
relay-information hex aabb.ccdd.eeff… [ * ]no relay-information hex aabb.ccdd.eeff… [ * ]Parameter

Parameter

Description
Hexadecimal Option82 matching information. The ‘*’ symbol means partial

Description
aabb.ccdd.eeff…[*]

matching which needs the front part matching only. Without the ‘*’ meansneeding full matching.

Defaults

N/A

Command

Global CLASS configuration mode

Mode

Usage Guide

N/A

Configuration

The following example configures a global CLASS which can match multiple Option82 information.

ExamplesRuijie(config)# ip dhcp class myclass
Ruijie(config-dhcp-class)# relay agent information
Ruijie(config-dhcp-class-relayinfo)# relay-information
hex 0102256535
Ruijie(config-dhcp-class-relayinfo)# relay-information
hex 010225654565
Ruijie(config-dhcp-class-relayinfo)# relay-information
hex 060225654565
Ruijie(config-dhcp-class-relayinfo)# relay-information

4-31

Command Reference

DHCP Commands

hex 060223*

RelatedCommand

Description

Commands

ip dhcp class

Defines a CLASS and enter the global CLASS configuration mode.

relay agent information

Enters the Option82 matching information configuration mode.

Platform

N/A

Description

4.40 remark
Use this command to configure the identification which is used to describe the CLASS in this global
CLASS configuration mode. Use the no form of this command to delete the identification.
remark class-remark
no remarkParameter
Description

Parameterclass-remark

Description
Information used to identify the CLASS, which can be the character
strings with space in them.

Defaults

N/A.

Command

Global CLASS configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example configures the identification information for a global CLASS.

ExamplesRuijie(config)# ip dhcp class myclass
Ruijie(config-dhcp-class)# remark used in #1 build

RelatedCommand

Description

Commands

ip dhcp class

Defines a CLASS and enter the global CLASS configuration mode.

Platform

N/A

Description

4.41 service dhcp
Use this command to enable the DHCP server and the DHCP relay on the device in global
configuration mode. Use the no form of this command toservice dhcp
no service dhcp

4-32

restore the default setting.

Command Reference

DHCP Commands

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

The service dhcp command is disabled.

Command

Global configuration mode

Mode

Usage Guide

The DHCP server can assign the IP addresses to the clients automatically, and provide them with the
network configuration information such as DNS server and default gateway. The DHCP relay canforward the DHCP requests to other servers, and the returned DHCP responses to the DHCP client,
serving as the relay for DHCP packets.

Configuration

The following example enables the DHCP server and the DHCP relay feature.

ExamplesRuijie(config)# service dhcp

RelatedCommand

Description

Commands

show ip dhcp server statistics

Displays various statistics information of the DHCP server.

ip helper-address [ vrf ] A.B.C.D

Adds an IP address of the DHCP server.

Platform

N/A

Description

4.42 show dhcp exclude
Use this command to display the excluded address.
show dhcp exclude

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the excluded address.

ExamplesRuijie# show dhcp exclude
low

high

-------------------- ---------------------

4-33

Command Reference

DHCP Commands

20.1.1.1

20.1.1.2

30.1.1.1

30.1.1.20

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.43 show dhcp lease
Use this command to display the lease information of the IP address obtained by the DHCP client.
show dhcp lease

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

If the IP address is not defined, display the binding condition of all addresses. If the IP address isdefined, display the binding condition of this IP address.

Configuration

The following example displays the result of the show dhcp lease.

ExamplesRuijie# show dhcp lease
Temp IP addr: 192.168.5.71 for peer on Interface: VLAN 1
Temp sub net mask: 255.255.255.0
DHCP Lease server: 192.168.5.70, state: 3 Bound
DHCP transaction id: 168F
Lease: 600 secs, Renewal: 300 secs, Rebind: 525 secs
Temp default-gateway addr: 192.168.5.1
Next timer fires after: 00:04:29
Retry count: 0 Client-ID: redgaint-00d0.f8fb.5740-Gi0/17

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4-34

Command Reference

DHCP Commands

4.44 show dhcp manual-bind
Use this command to display the binding address.
show dhcp manual-bind

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the binding address.

ExamplesRuijie# show dhcp manual-bind
ip

mask

--------- ---------

uid/macpool_name----------

gatewaydns----------- --------------------------

20.1.1.122 255.0.0.0
2.2.2.20000.0000.0001

ip

IP addressmask

Subnet mask

uid/mac

UID/MAC address

Pool name

Address pool namegateway

Gatewaydns

DNS server name

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.45 show dhcp name
Use this command to display all DHCP address pool names.
show dhcp nameParameter

Parameter

Description

4-35

static1

1.1.1.1

Command Reference

Description

N/A

Defaults

N/A

CommandPrivileged EXEC mode

DHCP Commands

N/A

Mode

Usage Guide

N/A

Configuration

The following example displays all DHCP address pool names.

ExamplesRuijie# show dhcp name
DYNAMIC POOL
pool name:net20
MANUAL POOL
pool name:static1
pool name:static2
UNKNOWN POOL

pool name:test
RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.46 show dhcp pool
Use this command to display the configuration of a specified address pool.
show dhcp pool nameParameter

Parameter

Description

Description

nameSpecifies the address pool.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the configuration of a specified address pool.

4-36

Command Reference

Examples

DHCP Commands

Ruijie# show dhcp pool net20
network : 20.0.0.0
netmask : 255.0.0.0
lease-infinite : false
lease-days : 1
lease-hours : 0
lease-minutes : 0
netbios-type : 0
domain-name :gateway :dns:
ntp:
option-43:

option-138:
RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.47 show dhcp state
Use this command to display whether DHCP server is enabled.
show dhcp stateParameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays whether DHCP server is enabled.

ExamplesRuijie# show dhcp statedhcp-server state : true

RelatedCommand

Description

Commands

N/A

N/A

4-37

Command Reference

Platform

DHCP Commands

N/A

Description

4.48 show ip dhcp binding
Use this command to display the binding condition of the DHCP address.
show ip dhcp binding [ ip-address ]Parameter

Parameter

Description

Description

ip-address(Optional) Only displays the binding condition of the specified IP addresses.

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

If the IP address is not defined, show the binding condition of all addresses. If the IP address isdefined, show the binding condition of this IP address

Configuration

The following is the result of the show ip dhcp binding.

ExamplesRuijie# show ip dhcp binding
Total number of clients: 4

Expired clients: 3

Running clients: 1

IP address

Hardware address

Lease expiration

Type

20.1.1.1

2000.0000.2011

000 days 23 hours 59 mins

Automatic

Description of fields in the command output is as follows:
Field

Description

IP address

The IP address to be assigned to the DHCP client.

Client-Identifier/Hardware address

The client identifier or hardware address of the DHCP client.
The expiration date of the lease. The Infinite indicates it is not

Lease expiration

limited by the time. The IDLE indicates the address is in the freestatus currently for it is not renewed or the DHCP client releases
it actively.
The type of the address binding. The Automatic indicates an IPTypeaddress is assigned automatically, and the Manual indicates an
IP address is assigned by manual.

RelatedCommand

Description

4-38

Command Reference

DHCP Commands

Commands

clear ip dhcp binding

Platform

N/A

Clears the DHCP address binding table.

Description

4.49 show ip dhcp conflict
Use this command to show the conflict history record of the DHCP sever.
show ip dhcp conflict

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

This command can display the conflict address list detected by the DHCP server.

Configuration

The following example displays the output result of the show ip dhcp conflict command.

ExamplesRuijie# show ip dhcp conflict
IP address Detection Method
192.168.12.1

Ping

Description of fields in the command output is as follows:
Field

Description

IP address

The IP addresses which cannot be assigned to the DHCP client.

Detection Method

The conflict detection method.

RelatedCommand

Description

Commands

clear ip dhcp conflict

Clears the DHCP conflict record.

Platform

N/A

Description

4.50 show ip dhcp history
Use this command to display the DHCP lease history.
show ip dhcp history

Parameter

Parameter

Description

4-39

Command Reference

DHCP Commands

Description

N/A

N/A

Defaults

N/A

CommandPriviledged EXEC mode

Mode

Usage Guide

This command is configured on the DHCP server.

Configuration

The following example displays the DHCP lease history.

ExamplesRuijie# show ip dhcp history
Expired clients: 3

IP address

Hardware address

Lease expiration

10.1.1.5

2222.abcd.47ac

IDLE

4097

10.1.1.4

2222.abcd.47ae

IDLE

4097

10.1.1.3

2222.abcd.47ad

IDLE

4097

Running clients: 0

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.51 show ip dhcp identifier
Use this command to display the DHCP address pool ID and address usage.
show ip dhcp identifier

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the DHCP address pool ID and address usage.

ExamplesRuijie# show ip dhcp identifier
Pool nameIdentifier

Total

Distributed Remained------------ ----------- -----------

4-40----------- --------

Vlan/Relay

Command Reference

DHCP Commands

wwp

597455782

65533

0

Field

Description

Pool name

Address pool name.

Identifier

Address pool ID.

Total

Total number of addresses.

Distributed

Number of allocated addresses.

Remained

Number of remained addresses.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

65533

Description

4.52 show ip dhcp pool
Use this command to display the address statistics of an address pool.
show ip dhcp pool [ poolname ]Parameter

Parameter

Description

Description

poolname(Optional) Address pool whose address statistics are to be displayed.

Defaults

Privileged EXEC mode.

Command

N/A

Mode

Usage Guide

Use this command to show the address statistics of an address pool.

Configuration

The following example displays the output result of the show ip dhcp pool poolname command.

ExamplesRuijie# show ip dhcp pool
Pool poolname:
Address range

192.168.0.1 – 192.168.0.254

Class range

192.168.0.1 – 192.168.0.254

Total address

252

Excluded2

Distributed

30

Conflict

10

Remained

212

Usage percentage

84.12698%

Lease threshold

90%

4-41

Command Reference

DHCP Commands

Description of fields in the command output is as follows:
Field

Description

Address range

Address range of the address pool.

Class range

Commands

Platform

address pool is not configured. Otherwise, the class range is displayed.

Total address

Total number of addresses that can be assigned in the address pool.

ExcludedNumber of excluded addresses.

Distributed

Number of assigned addresses.

Conflict

Number of conflicting addresses in the address pool.

Remained

RelatedClass address range. By default, the address range for the same

Number of remaining addresses that have not been assigned or can bereused.

Usage percentage

Address pool usage.

Lease threshold

Lease threshold.

Command

Description

ip dhcp pool

Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.

N/A

Description

4.53 show ip dhcp relay-statistics
Use this command to display the statistics of the DHCP relay.
show ip dhcp relay-statistics

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to display the statistics of the DHCP relay.

Configuration

The following example displays the statistics of the DHCP relay.

ExamplesRuijie# show ip dhcp relay-statistics
Cycle mode0

Message

Count

4-42

Command Reference

DHCP Commands

Discover

0

Offer

0

Request

0

Ack

0

Nak

0

Decline0

Release

0

Info

0

Bad

0

Direction

Count

Rx client0

Rx client uni

0

Rx client bro

0

Tx client0

Tx client uni

0

Tx client bro0

Rx server0

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.54 show ip dhcp server statistics
Use this command to display the statistics of the DHCP server.
show ip dhcp server statistics

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command displays the statistics of the DHCP server.

Configuration

The following example displays the output result of the show ip dhcp server statistics command.

ExamplesRuijie# show ip dhcp server statistics
Address pools

2

4-43

Command Reference

DHCP Commands

Lease counter4

Active Lease Counter0

Expired Lease Counter

4

Malformed messages

0

Dropped messages

0

Message

Received

BOOTREQUEST216

DHCPDISCOVER

33

DHCPREQUEST25

DHCPDECLINE0DHCPRELEASE

1

DHCPINFORM

150

Message

Sent

BOOTREPLY16

DHCPOFFER

9DHCPACK7DHCPNAK0

DHCPREQTIMES0DHCPREQSUCTIMES0DISCOVER-PROCESS-ERROR 0
LEASE-IN-PINGSTATE

0

NO-LEASE-RESOURCE0SERVERID-NO-MATCH

0-------------------------------------------recv

0

send

0

Description of fields in the command output is as follows:
Field

Description

Address pools

Number of address pools.

Lease countNumber of allocated lease.

Automatic bindings

Number of automatic address bindings.

Manual bindings

Number of manual address bindings.

Expired bindings

Number of expired address bindings.

Malformed
messages

Number of malformed messages received by the DHCP.

Message Received

Number of the messages received and sent by the DHCP server

or Sent

respectively.

4-44

Command Reference

DHCP Commands

RelatedCommand

Description

Commands

clear ip dhcp server statistics

Clears the DHCP server statistics.

Platform

N/A

Description

4.55 show ip dhcp socket
Use this command to display the socket used by the DHCP server.
show ip dhcp socket

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the socket used by the DHCP server.

ExamplesRuijie# show ip dhcp socket
dhcp socket = 47.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4-45

Command Reference

DHCPv6 Commands

5 DHCPv6 Commands
5.1 clear ipv6 dhcp client
Use this command to reset the DHCPv6 client.
clear ipv6 dhcp client interface-type interface-number

Parameter

Parameter

Description

interface-type
interface-number

Defaults

N/A

CommandPrivileged EXEC mode

Description
Sets the interface type and the interface number.

Mode

Usage Guide

This command is used to reset the DHCPv6 client, which may lead the client to request for theconfigurations from the server again.

Configuration

The following example resets DHCP client VLAN 1.

ExamplesRuijie# clear ipv6 dhcp client vlan 1

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

5.2 clear ipv6 dhcp relay statistics
Use this command to clear the packet sending and receiving condition with the DHCPv6 Relay
function enabled.
clear ipv6 dhcp relay statistics

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

5-1

Command Reference

Command

DHCPv6 Commands

Privileged EXEC mode

Mode

Usage Guide

Configuration
ExamplesN/A

The following example clears the packet sending and receiving condition with the DHCPv6 Relay
function enabled.
Ruijie# clear ipv6 dhcp relay statistics

RelatedCommand

Description

Commands

show ipv6 dhcp relay statistics

Displays the statistical information.

Platform

N/A

Description

5.3 ipv6 dhcp client ia
Use this command to enable DHCPv6 client mode and request the IANA address from the DHCPv6
server. Use the no form of this command to restore the default setting.
ipv6 dhcp client ia [ rapid-commit ]no ipv6 dhcp client

Parameter

Parameter

Description

Description

rapid-commit

Allows the two-message interaction process.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

This command is used to enable DHCPv6 client mode and request the IANA address from the
DHCPv6 server,
The rapid-commit keyword allows the two-message interaction process between the client and theserver. After the keyword is configured, the solicit message transmitted by the client contains the
rapid-commit option.

Configuration

The following example enables the request for the IANA address on the interface.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 dhcp client ia

RelatedCommand

Description

Commands

N/A

N/A

5-2

Command Reference

Platform

DHCPv6 Commands

N/A

Description

5.4 ipv6 dhcp client pd
Use this command to enable the DHCPv6 client and request for the prefix address information.
Use the no form of this command to restore the default setting.
ipv6 dhcp client pd prefix-name [ rapid-commit ]no ipv6 dhcp client

Parameter

Parameter

Description

Description

prefix-nameDefines the IPv6 prefix name.

rapid-commit

Allows the two-message interaction process.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

With the DHCPv6 client mode disabled, use this command to enable the DHCPv6 client mode on theinterface.
With the ipv6 dhcp client pd command enabled, the DHCPv6 client sends the prefix request to the
DHCPv6 server
The keyword rapid-commit allows the client and the server two-message interaction process. With
this keyword configured, the solicit message sent by the client includes the rapid-commit item.

Configuration

The following example enables the prefix information request on the interface.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 dhcp client pd pd_name

RelatedCommands

Command

Description
Resets the DHCPv6 client function on theclear ipv6 dhcp clientinterface.
Displays the DHCPv6 interface configuration.

show ipv6 dhcp interface

Platform

N/A

Description

5.5 ipv6 dhcp relay destination
Use this command to enable the DHCPv6 relay service and configure the destination address towhich the messages are forwarded.
Use the no form of this command to restore the default setting.

5-3Command Reference

DHCPv6 Commands

ipv6 dhcp relay destinationipv6-address [ interface-type interface-number ]no ipv6 dhcp relay destinationipv6-address [ interface-type interface-number ]Parameter

Parameter

Description

Description

ipv6-address

Sets the DHCPv6 relay destination address.

interface-typeSpecifies the forwarding output interface if the forwarding address isinterface-number

the local link address.

Defaults

By default, the relay and forward function is disabled, and the forwarding destination address and theoutput interface are not configured.

Command

Interface configuration mode

Mode

Usage Guide

With the DHCPv6 relay service enabled on the interface, the DHCPv6 message received on theinterface can be forwarded to all configured destination addresses. Those received DHCPv6
messages can be from the client, or from another DHCPv6 relay service.
The forwarding output interface configuration is mandatory if the forwarding address is the local linkaddress or the multicast address. And the forwarding output interface configuration is optional if theforwarding address is global or station unicast or multicast address.
Without the forwarding output interface configured, the interface is selected according to the unicast
or multicast routing protocol.
The relay reply message can be forwarded without the relay function enabled on the interface.

Configuration

The following example sets the relay destination address on the interface.

ExamplesRuijie(config)# interface VLAN 1
Ruijie(config-if-VLAN 1)# ipv6 dhcp relay destination 2008:1::1

RelatedCommand

Description

Commands

show ipv6 dhcp interface

Displays the DHCPv6 interface information.

Platform

N/A

Description

5.6 show ipv6 dhcp
Use this command to display the device DUID.
show ipv6 dhcp

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

5-4

Command Reference

Command

DHCPv6 Commands

Privileged EXEC mode/Interface configuration mode/Global configuration mode

Mode

Usage Guide

The server, client and relay on the same device share a DUID.

Configuration

The following example displays the device DUID.

ExamplesRuijie# show ipv6 dhcp
This device's DHCPv6 unique identifier(DUID): 00:03:00:01:00:d0:f8:22:33:b0

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

5.7 show ipv6 dhcp interface
Use this command to display the DHCPv6 interface information.
show ipv6 dhcp interface [ interface-name ]Parameter

Parameter

Description

Description

interface-nameSets the interface name.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

If the interface-name is not specified, all DHCPv6 interface information isdisplayed. If theinterface-name is specified, the specified interface information is displayed.

Configuration

The following example displays the DHCPv6 interface information.

ExamplesRuijie# show ipv6 dhcp interface
VLAN 1 is in server mode
Server pool dhcp-pool
Rapid-Commit: disable

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

5-5Command Reference

DHCPv6 Commands

5.8 show ipv6 dhcp relay destination
Use this command to display the destination information about DHCPv6 Relay Agent.
show ipv6 dhcp relay destination

Parameter
description

Parameter

Description
Displays information about all configured destination addresses andallrelay exits.

Interface interface-type

Displays the relay destination address and relay exit configured for ainterface-number

specified interface.

Defaults

N/A

CommandPrivileged EXEC mode

mode

Usage

Use this command to show the relay destination address to which DHCPv6 packets sent from a client

guideline

are forwarded through a specified relay exit (optional) by an interface for which the relay function has
been enabled by Relay Agent.

ExamplesThe following example displays all the relay destination addresses.
Ruijie# show ipv6 dhcp relay destination all
Interface: Vlan1//interface for which the relay function has been enabled

Destination address(es)Output Interface

3001::2
FF02::1:2//specified destination address

Vlan2//specified

relay exit

RelatedCommand

Descriptioncommands

N/A

N/A

Platform

N/A

description

5.9 show ipv6 dhcp relay statistics
Use this command to display the packet sending and receiving condition with the DHCPv6 Relay
function enabled.
show ipv6 dhcp relay statistics

Parameter

Parameter

Description

Description

N/A.

N/A.

5-6

Command Reference

DHCPv6 Commands

Defaults

N/A.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A.

Configuration

The following example displays the packet sending and receiving condition with the DHCPv6 Relay

Examplesfunction enabled.
Ruijie# show ipv6 dhcp relay statistics
Packets dropped
Error

: 2
: 2

Excess of rate limit
Packets received

: 0
: 28

SOLICIT: 0

REQUEST: 0

CONFIRM

: 0

RENEW

: 0

REBIND: 0

RELEASE: 0

DECLINE: 0

INFORMATION-REQUEST: 14

RELAY-FORWARD: 0

RELAY-REPLY: 14

Packets sent

: 16

ADVERTISE: 0

RECONFIGURE

: 0

REPLY

: 8

RELAY-FORWARD
RELAY-REPLY

: 8
: 0

RelatedCommand

Description

Commands

clear ipv6 dhcp relay statistics

Clears the statistical information.

Platform

N/A

Description

5-7

Command Reference

DNS Commands

6 DNS Commands
6.1 clear hostUse this command to clear the dynamically learned host name.
clear host [ * | host-name ]Parameter
Description

Parameter

Description

host-name

Deletes the specified dynamic domain name buffer.

*

Deletes all dynamic domain name buffer.

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

You can obtain the mapping record of the host name buffer table in two ways: 1) the ip host static
configuration, 2) the DNS dynamic learning. Execute this command to delete the host name records
learned by the DNS dynamically.

Configuration

The following configuration deletes the dynamically learned mapping records from the host name-IP

Examplesaddress buffer table.
Ruijie# clear host *RelatedCommands

Platform

Command

Description

show hosts

Displays the host name buffer table.

N/A

Description

6.2 ip domain-lookup
Use this command to enable DNS domain name resolution. Use the no form of this command todisable the DNS domain name resolution function.
ip domain-lookup
no ip domain-lookup

Parameter
Description

Parameter

Description

6-1

Command Reference

N/A

DNS Commands

N/A

Defaults

This function is enabled by default.

Command

Global configuration mode.

Mode

Usage Guide

This command enables the domain name resolution function.

Configuration

The following example disables the DNS domain name resolution function.

ExamplesRuijie(config)# no ip domain-lookup

RelatedCommands

Command

Description
Displays the DNS related configuration

show hosts

Platform

information.

N/A

Description

6.3 ip hostUse this command to configure the mapping of the host name and the IP address. Use the no form of
the command to remove the host list.
ip host host-name [ telnet-port ] ip-address
no ip host host-name [ telnet-port ] ip-address

Parameter
Description

Parameter

Description

host-nameHost name of the equipment

telnet-port

Telnet port number, ranging from 0 to 65535. The default value is 0.

ip-address

IP address of the equipment

Defaults

N/A

Command

Global configuration mode.

Mode

Usage Guide

N/A

Configuration

The following example configures IPv4 address 192.168.5.243 for domain name www.test.com.

ExamplesRuijie(config)# ip host www.test.com 192.168.5.243

6-2

Command Reference

RelatedCommands

DNS Commands

Command

Description
Shows the DNS related configuration

show hosts

Platform

information.

N/A

Description

6.4 ip name-server
Use this command to configure the IP address of the domain name server. Use the no form of thiscommand to delete the configured domain name server.
ip name-server { ip-address | ipv6-address }no ip name-server [ ip-address | ipv6-address ]Parameter
Description

Parameter

Description

ip-address

The IP address of the domain name server.

ipv6-address

The IPv6 address of the domain name server.

Defaults

No domain name server is configured by default.

Command

Global configuration mode.

Mode

Usage Guide

Add the IP address of the DNS server. Once this command is executed, the equipment will add a
DNS server. When the device cannot obtain the domain name from a DNS server, it will attempt tosend the DNS request to subsequent servers until it receives a response.
Up to 6 DNS servers are supported. You can delete a DNS server with the ip-address option or all the
DNS servers.

Configuration

The following example configures the IPv4 domain name server.

ExamplesRuijie(config)# ip name-server 192.168.5.134

RelatedCommands

Command

Description
Displays the DNS related configuration

show hosts

Platform

information.

N/A

Description

6-3

Command Reference

DNS Commands

6.5 ipv6 hostUse this command to configure the mapping of the host name and the IPv6 address by manual. Use
the no form of the command to remove the host list.
ipv6 host host-name [ telnet-port ] ipv6-address
no ipv6 host host-name [ telnet-port ] ipv6-address

Parameter
Description

Parameter

Description

host-nameHost name of the equipment

telnet-port

Telnet port number, ranging from 0 to 65535. The default value is 0.

ipv6-address

IPv6 address of the equipment

Defaults

N/A

Command

Global configuration mode.

Mode

Usage Guide

To delete the host list, use the no ipv6 host host-name ipv6-address command.

Configuration

The following example configures the IPv6 address for the domain name.

ExamplesRuijie(config)# ipv6 host switch 2001:0DB8:700:20:1::12

RelatedCommands

Command

Description
Displays the DNS related configuration

show hosts

Platform

information.

N/A

Description

6.6 show hosts
Use this command to display DNS configuration.
show hosts [ hostname ]Parameter
Description

Parameter

Description

hostname

Displays the specified domain name information,

Defaults

All domain name information is displayed by default.

CommandPrivileged EXEC mode.

6-4

Command Reference

DNS Commands

Mode

Usage Guide

This command is used to display the DNS related configuration information.

Configuration

Ruijie# show hosts

ExamplesName servers are:192.168.5.134 static
Host

type

Address

TTL(sec)

switchstatic192.168.5.243---

www.ruijie.com

dynamic

192.168.5.123

126

Field

Description

Name servers

Domain name server

Host

Domain nametype

Resolution type:
Static resolution and dynamic resolution.

Address

IP address corresponding to the domain nameTTL

TTL of entries corresponding to the domainname/IP address.

RelatedCommands

Command

Description
Configures the host name and IP address

ip hostmapping by manual.
Configures the host name and IPv6 address

ipv6 host

mapping by manual.
Configures the DNS server.

ip name-server

Platform

N/A

Description

6-5

Command Reference

FTP CLIENT Commands

7 FTP CLIENT Commands
7.1 copy flash
Use this command to upload the file from the server to the device through FTP Client.
copy flash:[ local-directory/ ]local-file
ftp://username:password@dest-address[ /remote-directory ]/remote-fileParameter
Description

Parameter

usernamepassworddest-address

Description
The username for logging into FTP Server. It is limited to 40 bytes
and must not contain ":", "@", "/" and space, neither can it be omitted.
The password for logging into FTP Server. It is limited to 32 bytes andmust not contain ":", "@", "/" and space, neither can it be omitted.
IP address of the target FTP Server.
File directory of FTP Server. It is optional and limited to 255 bytes. No

remote-directory

space or Chinese character is supported. If left blank, it implies thecurrent directory of FTP server.

remote-file

Filename on the remote server. It is limited to 255 bytes and doesn't
support space or Chinese character.
Directory of local folder (optional). If this directory is specified, thisdirectory must have been created beforehand. This command doesn't

local-directory

support automatic directory creation. If left blank, it implies the current
directory on the local device. It is limited to 255 bytes and doesn't
support space or Chinese characters.

local-file

Defaults

N/A

CommandPrivileged EXEC mode

Filename on the local device. It is limited to 255 bytes and doesn't
support space or Chinese character.

Mode

Usage Guide

N/A

Configuration

The following example uploads the file named "local-file" in directory "home" of local device to

Examplesdirectory "root" on the FTP Server whose user name is user, password is pass and IP address is
192.168.23.69, and changes the filename to "remote-file".
Ruijie# copy flash:home/local-file
ftp://user:pass@192.168.23.69/root/remote-file

7-1

Command Reference

RelatedCommands

Platform

FTP CLIENT Commands

Command

Description

N/A

N/A

N/A

Description

7.2 copy ftp
Use this command to download the file from the server to the device through FTP Client.
copy ftp://username:password@dest-address[ /remote-directory ]/remote-file
flash:[ local-directory/ ]local-file]Parameter
Description

Parameter

usernamepassworddest-address

Description
The username for logging into FTP Server. It is limited to 40 bytes
and must not contain ":", "@", "/" and space, neither can it be omitted.
The password for logging into FTP Server. It is limited to 32 bytes andmust not contain ":", "@", "/" and space, neither can it be omitted.
IP address of the target FTP Server.
File directory of FTP Server. It is optional and limited to 255 bytes. No

remote-directory

space or Chinese character is supported. If left blank, it implies thecurrent directory of FTP server.

remote-file

Filename on the remote server. It is limited to 255 bytes and doesn't
support space or Chinese character.
Directory of local folder (optional). If this directory is specified, thisdirectory must have been created beforehand. This command doesn't

local-directory

support automatic directory creation. If left blank, it implies the current
directory on the local device. It is limited to 255 bytes and doesn't
support space or Chinese characters.

local-file

Defaults

N/A

CommandPrivileged EXEC mode

Filename on the local device. It is limited to 255 bytes and doesn't
support space or Chinese character.

Mode

Usage Guide

N/A

Configuration

The following example uses username of "user" and password of "pass" to download a file named

Examples"remote-file" from the directory "root" on FTP Server with IP address 192.168.23.69 to directory

7-2

Command Reference

FTP CLIENT Commands"home" on the local device, and changes the name to "local-file".
Ruijie# copy ftp://user:pass@192.168.23.69/root/remote-file
flash:home/local-file

RelatedCommands

Platform

Command

Description

copy tftp

Uses the TFTP protocol to transfer files.

N/A

Description

7.3 ftp-client ascii
Use this command to use ASCII mode for FTP transfer.
Use the no or default form of this command to restore the default setting.
ftp-client ascii
no ftp-client ascii
default ftp-client ascii

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The default FTP transfer mode is binary.

Command

Global configuration mode

Mode

Usage Guide

The default command is used to restore the FTP client setting. Specifically, data connection is in
PASV mode and file transfer BINARY. The client source IP address is not bound.

Configuration

The following example configures ASCII FTP transfer.

ExamplesRuijie (config)# ftp-client ascii

The following example configures binary FTP transfer.
Ruijie(config)# no ftp-client ascii

The following example restores the default setting of the FTP Client.
Ruijie(config)# default ftp-client ascii

RelatedCommands

Command

Description

N/A

N/A

7-3

Command Reference

Platform

FTP CLIENT Commands

N/A

Description

7.4 ftp-client port
Use this command to configure PORT mode used for FTP data connection. Use the no or default
form of this command to restore the default setting.
ftp-client port
no ftp-client port
default ftp-client port

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The default is PASV mode for FTP data connection.

Command

Global configuration mode.

Mode

Usage Guide

This command is used to configure the connection mode to PORT mode, in which the server will
actively connect with the client.
The default command is used to restore the FTP client setting. Specifically, data connection is in
PASV mode and file transfer BINARY. The client source IP address is not bound.

Configuration

The following example configures PORT mode used for FTP data connection

ExamplesRuijie (config)# ftp-client port

The following example configures PASV mode for FTP data connection.
Ruijie(config)# no ftp-client port

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.5 ftp-client source-address
Use this command to bind FTP Client with the source IP address of client and use this IP address to

7-4

Command Reference

FTP CLIENT Commands

communicate with server. Use the no form of this command to disable source IP address binding.
Use the no or default form of this command to restore the default setting.
ftp-client source { ip-address | ipv6-address }no ftp-client source
default ftp-client source

Parameter
Description

Parameter

Description

ip-address

Specifies the IPv4 address of a local interface.

ipv6-address

Specifies the IPv6 address of a local interface.

Defaults

By default, the IP address is not bound with the client locally. Instead, it is selected by the route.

Command

Global configuration mode

Mode

Usage Guide

The default command is used to restore the FTP client setting. Specifically, data connection is in
PASV mode and file transfer BINARY. The client source IP address is not bound.

Configuration

The following example binds FTP Client with source IP address 192.168.23.236.

ExamplesRuijie(config)# ftp-client source 192.168.23.236

The following example binds FTP Client with source IP address 2003:0:0:0::2.
Ruijie(config)# ftp-client source 2003:0:0:0::2

The following example disables source IP address binding.
Ruijie(config)# no ftp-client source

The following example restores the default setting of the FTP Client.
Ruijie(config)# default ftp-client source

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7-5

Command Reference

Network Connectivity Test Tool Commands

8 Network Connectivity Test Tool Commands
8.1 ping
Use this command to test the connectivity of a network to locate the network connectivity problem. The
command format is as follows:
ping [ ip ] { address [ length length ] [ ntimes times ] [ timeout seconds ] [ data data ] [ source source ][ df-bit ] [ validate ] [ detail ] [ out-interface interface [next-hop next-hop]] }Parameter
Description

Parameter

Description

address

Specifies an IPv4 address.

lengthtimes

Specifies the length of the packet to be sent (range: 36-18024,
default: 100).
Specifies the number of packets to be sent (range:14294967295).

seconds

Specifies the timeout time (range: 1-10 seconds).

data

Specifies the data to fill in.
Specifies the source IPv4 address or the source interface. The

sourceloopback interface address (for example: 127.0.0.1) is notallowed to be the source address.

df-bitvalidate
detailDefaults

Sets the DF bit for the IP address. DF bit=1 indicates not tosegment the datagrams. By default, the DF bit is 0.
Sets whether to validate the reply packets or not.
Sets whether to contain details in the echoed message. Bydefault, only “!” and “.” are displayed.

interface

Specifies the outbound interface

next-hopSpecifies the next hop IPv4 address

Five packets with 100Byte in length are sent to the specified IP address within specified time (2s by
default).

CommandPrivileged EXEC mode.

Mode

Usage Guide

If the device can be pinged, the response information is displayed, and the statistics is listed at the end.
For the extension functions of ping, the number, quantity and timeout time of the packets to be sent canbe specified, and the statistics is also displayed in the end. To use the domain name function, configure
the domain name server firstly. For the concrete configuration, refer to the DNS Configuration section.

Configuratio

The following example tests the connectivity of a network to locate the network connectivity problem.

8-1

Command Referencen Examples

Network Connectivity Test Tool Commands(RG-S29 series products do not support the VRF parameter. The following example is for reference
purpose. Please take the actual device as the standard.)
Ruijie# ping 192.168.21.26
Sending 5, 100-byte ICMP Echoes to 192.168.21.26, timeout is 2 seconds:< press Ctrl+C to break >!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms

The following example displays details.
Ruijie#ping 192.168.21.26 detail*Apr 16 09:16:08: %PING-7-DEBUG: Ping vrf index -1.
Sending 5, 100-byte ICMP Echoes to 192.168.21.26, timeout is 2 seconds:< press Ctrl+C to break >Reply from 192.168.21.26: bytes=100 time=4ms TTL=64
Reply from 192.168.21.26: bytes=100 time=3ms TTL=64
Reply from 192.168.21.26: bytes=100 time=1ms TTL=64
Reply from 192.168.21.26: bytes=100 time=1ms TTL=64
Reply from 192.168.21.26: bytes=100 time=1ms TTL=64
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms.2

The following example tests the connectivity of a network to locate the network connectivity problem(extension ping).
Ruijie# ping 192.168.21.26 length 1500 ntimes 100 data ffff source 192.168.21.99
timeout 3
Sending 100, 1500-byte ICMP Echoes to 192.168.21.26, timeout is 3 seconds:< press Ctrl+C to break >!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 2/2/3 ms

The following example displays the details.
ping 192.168.21.26 length 1500 ntimes 20 data ffff source 192.168.21.99 timeout
3 detail
Sending 20, 1500-byte ICMP Echoes to 192.168.21.26, timeout is 3 seconds:< press Ctrl+C to break >Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64

8-2

Command Reference

Network Connectivity Test Tool Commands

Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=2ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=3ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64

Success rate is 100 percent (20/20), round-trip min/avg/max = 1/1/3
ms
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8.2 ping ipv6
Use this command to test the connectivity of a network to locate the network connectivity problem. The
command format is as follows:
ping [ ipv6] { address [ length length ] [ ntimes times ] [ timeout seconds ] [ data data ] [ source source ][ detail ] [ out-interface interface [next-hop next-hop]] }Parameter
Descriptio

Parameter

Description

ip-address

Specifies an IPv6 address.

nlengthSpecifies the length of the packet to be sent (range: 36-18024, default:
100).

times

Specifies the number of packets to be sent (range:1-4294967295).

seconds

Specifies the timeout time (range: 1-10 seconds).

data

Specifies the data to fill in.

sourceSpecifies the source IPv6 address or the source interface. The
loopback interface address (for example: 127.0.0.1) is not allowed to

8-3

Command Reference

Network Connectivity Test Tool Commands

be the source address.
detailDefaults

Sets whether to contain details in the echoed message. By default,
only “!” and “.” are displayed.

interface

Specifies the outbound interface

next-hopSpecifies the next hop IPv6 address

Five packets with 100Byte in length are sent to the specified IP address within specified time 2 seconds bydefault

CommandPrivileged EXEC mode.

Mode

Usage

If the device can be pinged, the response information is displayed, and the statistics is listed at the end. If the

Guide

response data does not match the request data, a ‘Request receive error.’ message is displayed and thestatistics is listed in the end. For the extension functions of ping ipv6, the number, quantity and timeout timeof the packets to be sent can be specified, and the statistics is also displayed in the end. To use the domainname function, configure the domain name server firstly. For the concrete configuration, refer to the DNS
Configuration section.

Configurat

The following example tests the connectivity of a network to locate the network connectivity problem.

ion

Ruijie# ping ipv6 2000::1

ExamplesSending 5, 100-byte ICMP Echoes to 2000::1, timeout is 2 seconds:< press Ctrl+C to break >!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms

The example below shows the extension ping ipv6.
Ruijie# ping ipv6 2000::1 length 1500 ntimes 100 timeout 3 data ffff source 192::10:
Sending 100, 1500-byte ICMP Echoes to 2000::1, timeout is 3 seconds< press Ctrl+C to break >!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 2/2/3 ms

RelatedCommandCommand

Description

N/A

N/A

s

Platform

N/A

Descriptio
n8-4Command Reference

Network Connectivity Test Tool Commands

8.3 traceroute
Use this command to display all gateways passed by the test packets from the source address to thedestination address.
traceroute [ ip ] { address [ probe number ] [ source source ] [ timeout seconds ] [ ttl minimum
maximum ] [out-interface interface [next-hop next-hop] ] }Parameter
Description

Parameter

Description

address

Specifies an IPv4 address.

numberSpecifies the number of probe packets to be sent (range: 1-255).
Specifies the source IPv4 address or the source interface. The

sourceloopback interface address (for example: 127.0.0.1) is not allowed tobe the source address.

seconds

Specifies the timeout time (range: 1-10 seconds).

minimum maximum

Specifies the minimum and maximum TTL values (range:1-255).

interface

Specifies the outbound interface

next-hopSpecifies the next hop IPv4 address

Defaults

By default, seconds is 3 seconds, number is 3, minimum and maximum are 1 and 255.

CommandPrivileged EXEC mode: enables extended functions.

Mode

User EXEC mode: enables basic functions.

Usage Guide

Use the traceroute command to test the connectivity of a network to exactly locate the network
connectivity problem when the network failure occurs. To use the function domain name, configure
the domain name server. For the concrete configuration, refer to the DNS Configuration part.

Configuration

The following is three examples of the application bout traceroute, the one is of the smooth network,

Examplesand the other is the network in which some gateways aren’t connected successfully.
1. When the network is connected smoothly:
Ruijie# traceroute 61.154.22.36< press Ctrl+C to break >Tracing the route to 61.154.22.36
1

192.168.12.1

0 msec0 msec0 msec2

192.168.9.2

4 msec4 msec4 msec3

192.168.9.1

8 msec8 msec4 msec4

192.168.0.10

4 msec28 msec 12 msec

5

192.168.9.2

4 msec4 msec6202.101.143.154

7

61.154.22.36

4 msec

12 msec 8 msec
12 msec 8 msec

24 msec

22 msec

From above result, it’s clear to know that the gateways passed by the packets sent to the host with an

8-5

Command Reference

Network Connectivity Test Tool Commands

IP address of 61.154.22.36 (gateways 1~6) and the spent time are displayed. Such information is
helpful for network analysis.

2. When some gateways in the network fail:Ruijie# traceroute 202.108.37.42< press Ctrl+C to break >Tracing the route to 202.108.37.421

192.168.12.1

0 msec0 msec 0 msec

2

192.168.9.2

0 msec4 msec 4 msec

3

192.168.110.1

16 msec 12 msec 16 msec

4

* * *

5

61.154.8.129

12 msec

28 msec 12 msec

661.154.8.17

8 msec

12 msec 16 msec

761.154.8.250

12 msec

12 msec 12 msec

8

218.85.157.222

12 msec

12 msec 12 msec

9218.85.157.130

16 msec

16 msec 16 msec

10

218.85.157.77

16 msec

48 msec 16 msec

11

202.97.40.65

76 msec

24 msec 24 msec

12

202.97.37.65

32 msec

24 msec 24 msec

13

202.97.38.162

52 msec

52 msec 224 msec

14

202.96.12.38

84 msec

52 msec 52 msec

15

202.106.192.226 88 msec

52 msec 52 msec

16

202.106.192.174

17210.74.176.158

100 msec 52 msec 84 msec

18202.108.37.42

48 msec

52 msec

52 msec 88 msec

48 msec 52 msec

The above result clearly shown that the gateways passed by the packets sent to the host with an IP
address of 202.108.37.42 (gateways 1~17) and the spent time are displayed, and gateway 4 fails.

3. When this function is enabled based on a domain name:
Ruijie# traceroute www.ietf.org
Translating "www.ietf.org"...[OK]< press Ctrl+C to break >Tracing the route to 64.170.98.32
1

192.168.217.1

0 msec 0 msec 0 msec

2

10.10.25.1

0 msec 0 msec 0 msec

3

10.10.24.1

0 msec 0 msec 0 msec

4

10.10.30.1

10 msec 0 msec 0 msec

5

218.5.3.254

0 msec 0 msec 0 msec

661.154.8.49

10 msec 0 msec 0 msec

7202.109.204.210 0 msec 0 msec 0 msec

8

202.97.41.69

20 msec 10 msec 20 msec

9

202.97.34.65

40 msec 40 msec 50 msec

8-6

Command Reference

RelatedCommands

Platform

Network Connectivity Test Tool Commands

10

202.97.57.222

11

219.141.130.122 40 msec 50 msec 40 msec

12219.142.11.10

40 msec 50 msec 30 msec

13

211.157.37.14

50 msec 40 msec 50 msec

14222.35.65.1

40 msec 50 msec 40 msec

15222.35.65.18

40 msec 40 msec 40 msec

16222.35.15.109

50 msec 50 msec 50 msec

17

*

18

64.170.98.32*

50 msec 40 msec 40 msec*
40 msec 40 msec 40 msec

Command

Description

N/A

N/A

N/A

Description

8.4 traceroute ipv6
Use this command to display all gateways passed by the test packets from the source address to thedestination address.
traceroute [ ipv6 ] { address [ probe number ] [ source source ] [ timeout seconds ] [ ttl minimum
maximum ] [ out-interface interface [next-hop next-hop]] }Parameter
Description

Parameter

Description

address

Specifies an IPv6 address.

numberSpecifies the number of probe packets to be sent.
Specifies the source IPv4 address or the source interface. The

sourceloopback interface address (for example: 127.0.0.1) is not allowed tobe the source address.

seconds

Specifies the timeout time.

minimum maximum

Specifies the minimum and maximum TTL values.

interface

Specifies the outbound interface

next-hopSpecifies the next hop IPv6 address

Defaults

By default, seconds is 3 seconds, number is 3, minimum and maximum are 1 and 255.

CommandPrivileged EXEC mode: enables extended functions.

Mode

User EXEC mode: enables basic functions.

Usage Guide

Use the traceroute ipv6 command to test the connectivity of a network to exactly locate the network
connectivity problem when the network failure occurs. To use the function domain name, configure

8-7

Command Reference

Network Connectivity Test Tool Commands

the domain name server. For the concrete configuration, refer to the DNS Configuration part.

Configuration

The following is two examples of the application bout traceroute ipv6, the one is of the smooth

Examplesnetwork, and the other is the network in which some gateways aren’t connected successfully.
1. When the network is connected smoothly:
Ruijie# traceroute ipv6 3004::1< press Ctrl+C to break >Tracing the route to 3004::1
1

3000::1

0 msec 0 msec 0 msec

23001::1

4 msec 4 msec 4 msec

33002::1

8 msec 8 msec 4 msec

43004::1

4 msec 28 msec 12 msec

From above result, it’s clear to know that the gateways passed by the packets sent to the host with an
IP address of 3004::1 (gateways 1~4) and the spent time are displayed. Such information is helpful
for network analysis.
2. When some gateways in the network fail:Ruijie# traceroute ipv6 3004::1< press Ctrl+C to break >Tracing the route to 3004::1
1

3000::1

0 msec 0 msec 0 msec

23001::1

4 msec 4 msec 4 msec

33002::1

8 msec 8 msec 4 msec

4

* * *

5

3004::1

4 msec 28 msec 12 msec

The above result clearly shown that the gateways passed by the packets sent to the host with an IP
address of 3004::1 (gateways 1~5) and the spent time are displayed, and gateway 4 fails.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

8-8

Command Reference

TCP Commands

9 TCP Commands
9.1 ip tcp keepalive
Use this command to enable the TCP keepalive function. Use the no form of this command to restore
the default setting.
ip tcp keepalive [ interval num1 ] [ times num2 ] [ idle-period num3 ]no ip tcp keepalive

Parameter
Description

Parameterinterval num1

times num2

Description
The interval of sending the keepalive packet, in the range from1 to
120 in the unit of seconds, The default is 75.
Keepalive packet sending times, in the range from 1 to 10. The
default is 6.
Idle time, the time period during which the peer end does not sendidle-period num3

any packet to the local end, in the range from 60 to 1800 in the unit ofseconds. The default is 900.

Defaults

The function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

The keepalive function enables TCP to detect whether the peer end is operating properly.
Suppose the keepalive function is enabled together with default interval, times and idle-period
settings. TCP begins to send the keepalive packet at an interval of 75 seconds if it does not receive
any packet from the peer end in 900 seconds. The TCP connection is considered invalid and thendisconnected automatically if the device sends the keepalive packet for six consecutive times without
receiving any TCP packet from the peer end. This command applies to both IPv4 and IPv6 TCP.

Configuration

The following example enables the TCP keepalive function on the device and sets the idle-period

Examplesand interval to180 and 60 respectively. If the device sends the keepalive packet for four consecutive
times without receiving any TCP packet from the peer end, the TCP connection is considered invalid.
Ruijie(config)# ip tcp keepalive interval 60 times 4 idle-period 180

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9-1

Command Reference

TCP Commands

9.2 ip tcp mss
Use this command to set the upper limit of the MSS value. Use the no form of this command torestore the default setting.
ip tcp mss max-segment-size
no ip tcp mss

Parameter
Description

Parameter

Description

max-segment-size

Upper limit of the MSS value in the range from 68 to 10000 bytes

Defaults

The default MSS = Outgoing IPv4/v6 MTU- IPv4/v6 header-TCP header.

Command

Global configuration mode

Mode

Usage Guide

This command is used to limit the maximum value of MSS for the TCP connection to be created. The
negotiated MSS cannot exceed the configured value. You can use this command to reduce themaximum value of MSS. However, this configuration is not needed in general. This command applies
to both IPv4 and IPv6 TCP.

Configuration

The following example sets the upper limit of the MSS value to 1300 bytes.

ExamplesRuijie(config)# ip tcp mss 1300

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.3 ip tcp path-mtu-discovery
Use this command to enable Path Maximum Transmission Unit (PMTU) discovery function for TCP in
global configuration mode. Use the no form of this command to restore the default setting.
ip tcp path-mtu-discovery [ age-timer minutes | age-timer infinite ]no ip tcp path-mtu-discovery

Parameter
Description

Parameter

age-timer minutes
age-timer infinite

Description
The time interval for further discovery after discovering PMTU. Itsvalue ranges from 10 to 30 minutes. The default value is 10.
No further discovery after discovering PMTU

9-2

Command Reference

TCP Commands

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

Based on RFC1191, the TCP path MTU function improves the network bandwidth utilization and datatransmission when the user uses TCP to transmit the data in batch.
Enabling or disabling this function takes no effect for existent TCP connections and is only effective
for TCP connections to be created. This command applies to only IPv4 TCP. This function is enabled
for IPv6 TCP constantly and cannot be disabled.
According to RFC1191, after discovering the PMTU, the TCP uses a greater MSS to detect the new
PMTU at a certain interval, which is specified by the parameter age-timer. If the PMTU discovered issmaller than the MSS negotiated between two ends of the TCP connection, the device will be trying todiscover the greater PMTU at the specified interval untill the PMTU value reaches the MSS or theuser stops this timer. Use the parameter age-timer infinite to stop this timer.

Configuration

The following example enables PMTU discovery.

ExamplesRuijie(config)# ip tcp path-mtu-discovery

RelatedCommands

Command

Description
Shows the PMTU value for the TCP

show tcp pmtu

Platform

connection.

N/A

Description

9.4 ip tcp send-reset
Use this command to enable the device to send the reset packet when receiving the TCP port
unreachable packet. Use the no form of this command to disable this function,
ip tcp send-reset
no ip tcp send-reset

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is enabled by default.

Command

Global configuration mode

Mode

9-3

Command Reference

Usage Guide

TCP Commands

In general, when dispatching the TCP packet, the TCP module replies a reset packet automatically to
disconnect the TCP connection with the peer end if the TCP connection that this packet belongs to is
not found, However, flooding TCP port unreachable packets pose an attack threat to the device, This
command can be used to disable the device from sending the reset packet when receiving the TCP
port unreachable packet. This command applies to both IPv4 and IPv6 TCP.

Configuration

The following example disables the device from sending the reset packet when receiving the TCP

Examplesport unreachable packet.
Ruijie(config)# no ip tcp send-reset

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.5 ip tcp window-size
Use this command to change the size of receiving buffer and sending buffer for TCP connections.
Use the no form of this command to restore the default setting.
ip tcp window-size size
no ip tcp window-size

Parameter
Description

Parameter

size

Defaults

The default is 65535.

Command

Global configuration mode

Description
Size of receiving buffer and sending buffer for TCP connections in therange from 128 to 65535 << 14 bytes.

Mode

Usage Guide

The TCP receiving buffer is used to buffer the data received from the peer end. These data will be
subsequently read by application programs. Generally, the window size of TCP packets implies thesize of free space in the receiving buffer. For connections involving a large bandwidth and mass data,
increasing the size of receiving buffer will remarkably improve TCP transmission performance.
The sending buffer is used to buffer the data of application programs. Each byte in the sending buffer
has a sequence number, and bytes with sequence numbers acknowledged will be removed from thesending buffer. Increasing the sending buffer will improve the interaction between TCP andapplication programs, thus enhancing the performance. However, increasing the receiving buffer andsending buffer will result in more memory consumption of TCP.
This command is used to change the size of receiving buffer and sending buffer for TCP connections.

9-4

Command Reference

TCP Commands

This command changes both the receiving buffer and sending buffer, and only applies to subsequentconnections. This command applies to both IPv4 and IPv6 TCP.

Configuration

The following example sets the TCP window size to 16386 bytes.

ExamplesRuijie(config)# ip tcp window-size 16386

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.6 show ipv6 tcp connect
Use this command to display the current IPv6 TCP connection information.
show ipv6 tcp connect [ local-ipv6 X:X:X:X::X ] [ local-port num ] [ peer-ipv6 X:X:X:X::X ][ peer-port num ]Use this command to display the current IPv6 TCP connection statistics.
show ipv6 tcp connect statistics

Parameter
Description

Parameter

Description

local-ipv6 X:X:X:X::X

Local IPv6 address

local-port num

Local port

peer-ipv6 X:X:X:X::X

Peer IPv6 address

peer-port num

Peer port

statistics

Displays IPv6 TCP connection statistics

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the current IPv6 TCP connection information.

ExamplesRuijie# show ipv6 tcp connect
Number Local Address

Foreign Address

State

Process name

1

:::22

:::0

LISTENrg-sshd

2

:::23

:::0

LISTENrg-telnetd

3

1000::1:23

1000::2:64201

ESTABLISHED

rg-telnetd

The following example displays the current IPv6 TCP connection statistics.

9-5

Command Reference

TCP Commands

Ruijie#show ipv6 tcp connect statistics
State

Count

-----

-----

ESTABLISHED 1
SYN_SENT0

SYN_RECV0

FIN_WAIT10

FIN_WAIT20

TIME_WAIT

0

CLOSED0

CLOSE_WAIT

0

LAST_ACK0LISTEN

1

CLOSING0

Total: 2

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.7 show ipv6 tcp pmtu
Use this command to display information about IPv6 TCP PMTU.
show ipv6 tcp pmtu [ local-ipv6 X:X:X:X::X ] [ local-port num ] [ peer-ipv6 X:X:X:X::X ] [ peer-portnum ]Parameter
Description

Parameter

Description

local-ipv6 X:X:X:X::X

Local IPv6 address

local-port num

Local port

peer-ipv6 X:X:X:X::X

Peer IPv6 address

peer-port num

Peer port

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

9-6

Command Reference

TCP Commands

Configuration

The following example information about IPv6 TCP PMTU.

ExamplesRuijie# show ipv6 tcp pmtu
Number Local Address

1

Foreign Address

1000::1:23

PMTU

1000::2.13560

Field

Description

NumberNumberLocal Address

Local address and port number. The number after the last colon is
the port number.

Foreign Address

Remote address and port number. The number after the last colon is
the port number.

PMTU

RelatedCommands

Platform

Path MTU.

Command

Description

N/A

N/A

N/A

Description

9.8 show ipv6 tcp port
Use this command to display the current IPv6 TCP port status.
show ipv6 tcp port [ num ]Parameter
Description

Parameter

Description

numPort number

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the current IPv6 TCP port status.

ExamplesRuijie# show ipv6 tcp port
TCP connections on port 23:
Number Local Address Foreign Address
1

1000::1:23

1000::2:64571

Total: 1

9-7

State
ESTABLISHEDCommand Reference

TCP Commands

TCP connections on port 2650:
Number Local Address Foreign Address

State

Total: 0

Field

Description

NumberNumberLocal Address

Local address and port number.

Foreign Address

Remote address and port number.

State

Current status of the TCP connection. There are eleven possible states:
CLOSED: The connection has been closed.
LISTEN: Listening state
SYNSENT: In the three-way handshake phase when the SYN packet
has been sent out.
SYNRCVD: In the three-way handshake phase when the SYN packet
has been received.
ESTABLISHED: The connection has been established.
FINWAIT1: The local end has sent the FIN packet.
FINWAIT2: The FIN packet sent by the local end has been
acknowledged.
CLOSEWAIT: The local end has received the FIN packet from the peer
end.
LASTACK: The local end has received the FIN packet from the peer
end, and then sent its own FIN packet.
CLOSING: The local end has sent the FIN packet from the peer end,
and received the FIN packet from the peer end before the ACK packet
for the peer end to respond with this FIN packet is received.
TIMEWAIT: The FIN packet sent by the local end has been
acknowledged, and the local end has also acknowledged the FIN
packet.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.9 show tcp connect
Use this command to display basic information about the current TCP connections.
show tcp connect [ local-ip a.b.c.d ] [ local-port num ] [ peer-ip a.b.c.d ] [ peer-port num ]9-8Command Reference

TCP Commands

Use this command to display the current IPv4 TCP connection statistics.
show tcp connect statistics

Parameter
Description

Parameter

Description

local-ip a.b.c.dLocal IP address.

local-port num

Local port.

peer-ip a.b.c.dPeer IP address.

peer-port num

Peer port.

statistics

Displays IPv4 TCP connection statistics.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the current IPv4 TCP connection information.

ExamplesRuijie# show tcp connect
Number Local Address

Foreign Address

State

Process name1

0.0.0.0:22

0.0.0.0:0

LISTENrg-sshd

20.0.0.0:23

0.0.0.0:0

LISTENrg-telnetd

3

1.1.1.1:23

1.1.1.2:64201

ESTABLISHED rg-telnetd

Field

Description

NumberSequence number.

Local Address

The Local address and port number. The number after the last“.” is the port number. For example, in “2002::2.23” and“192.168.195.212.23” , “23” is the port number.

Foreign Address

The remote address and port number. The number after thelast “.” is the port number. For example, in “2002::2.23” and“192.168.195.212.23” , “23” is the port number.

State

Current status of the TCP connection. There are elevenpossible states:
CLOSED: The connection has been closed.
LISTEN: Listening state
SYNSENT: In the three-way handshake phase when the SYN
packet has been sent out.
SYNRCVD: In the three-way handshake phase when the SYN
packet has been received.
ESTABLISHED: The connection has been established.
FINWAIT1: The local end has sent the FIN packet.
FINWAIT2: The FIN packet sent by the local end has been

9-9Command Reference

TCP Commands

acknowledged.
CLOSEWAIT: The local end has received the FIN packet fromthe peer end.
LASTACK: The local end has received the FIN packet from thepeer end, and then sent its own FIN packet.
CLOSING: The local end has sent the FIN packet from the peer
end, and received the FIN packet from the peer end before the
ACK packet for the peer end to respond with this FIN packet isreceived.
TIMEWAIT: The FIN packet sent by the local end has been
acknowledged, and the local end has also acknowledged the
FIN packet.
Process name

Process name.

The following example displays the current IPv4 TCP connection statistics.
Ruijie# show tcp connect statistics
State

Count

-----

-----

ESTABLISHED 1
SYN_SENT0

SYN_RECV0

FIN_WAIT10

FIN_WAIT20

TIME_WAIT

0

CLOSED0

CLOSE_WAIT

0

LAST_ACK0LISTEN

1

CLOSING0

Total: 2

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.10 show tcp parameter
Use this command to show TCP parameters.
show tcp parameter

9-10

Command Reference

Parameter
Description

TCP Commands

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example shows TCP parameters.

ExamplesRuijie# show tcp parameter
Hash table information:
Established hash bucket size: 16384
Bind hash bucket size: 16384
Memory information:
Global memory limit: low=92160, pressure=122880, high=184320 (unit: pages)
Per-socket receive buffer size: min=4096, default=87380, max=3932160 (unit:
bytes)
Per-socket send buffer size: min=4096, default=16384, max=3932160 (unit:
bytes)
Current allocated memory: 0
Current memory pressure flag: 0
SYN specific information:
Max SYN_RECV sockets per LISTEN socket: 65535
Max SYN retries: 5
Max SYN ACK retries: 5
Timewait specific information:
Max timewait sockets: 180000
Current timewait sockets: 0
Timewait recycle: 0
Reuse timewait port: 0
Keepalive information:
Keepalive on: 0
Idle period: 900 seconds
Interval: 75 seconds
Max probes: 6
MTU probing:Enable mtu probing: 0
FIN specific information:
FIN_WAIT_2 timeout: 60 seconds
Orphan socket information:
Max orphans: 16384

9-11

Command Reference

TCP Commands

Max orphan retries: 0
Current orphans: 0

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.11 show tcp pmtu
Use this command to display information about TCP PMTU.
show tcp pmtu [ local-ip a.b.c.d ] [ local-port num ] [ peer-ip a.b.c.d ] [ peer-port num ]Parameter
Description

Parameter

Description

local-ip a.b.c.dLocal IP address.

local-port num

Local port.

peer-ip a.b.c.dPeer IP address.

peer-port num

Peer port.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays PMTU of IPv4 TCP connection.

ExamplesRuijie# show tcp pmtu
Number Local Address

Foreign Address1

192.168.195.112.13560 1440

192.168.195.212.23

PMTU

Field

Description

NumberSequence number.

Local Address

The local address and the port number. The number after the last“.” is the port number. For example, in “2002::2.23” and“192.168.195.212.23” , “23” is the port number.

Foreign Address

The remote address and the port number. The number after thelast "." is the port number. For example, in “2002::2.23” and“192.168.195.212.23” , “23” is the port number.

PMTU

PMTU value.

9-12

Command Reference

RelatedCommands

Platform

TCP Commands

Command

Description

ip tcp path-mtu-discovery

Enables the TCP PMTU discovery function.

N/A

Description

9.12 show tcp port
Use this command to display information about the current TCP port.
show tcp port [ num ]Parameter
Description

Parameter

Description

numPort number

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the current IPv4 TCP port status.

ExamplesRuijie# show tcp port
tcp port status:
Tcpv4 listen on 2650 have connections:
TCB

Foreign Address

Port

State

Tcpv4 listen on 2650 have total 0 connections.
Tcpv4 listen on 23 have connections:
TCB

Foreign Address

Port

State

c340800

1.1.1.2

64571

ESTABLISHED

Tcpv4 listen on 23 have total 1 connections.
Tcpv6 listen on 23 have connections:
TCB

Foreign Address

Port

State

c429980

3000::2

64572

ESTABLISHED

Description of fields in the command output is as follows:
Field

Description

TCB

The control block’s location in the current memory

Foreign Address

Remote address

9-13

Command Reference

TCP Commands

Port

Remote port number

State

Status of the current TCP connection. There are eleven possible
states:
CLOSED: The connection has been closed.
LISTEN: Listening state
SYNSENT: In the three-way handshake phase when the SYN
packet has been sent.
SYNRCVD: In the three-way handshake phase when the SYN
packet has been received.
ESTABLISHED: The connection has been established.
FINWAIT1: The local end has sent the FIN packet.
FINWAIT2: The FIN packet sent by the local end has been
acknowledged.
CLOSEWAIT: The local end has received the FIN packet fromthe peer end.
LASTACK: The local end has received the FIN packet from thepeer end, and then sent its own FIN packet.
CLOSING: The local end has sent the FIN packet from the peer
end, and received the FIN packet from the peer end before the
ACK packet for the peer end to respond with this FIN packet isreceived.
TIMEWAIT: The FIN packet sent by the local end has been
acknowledged, and the local end has also acknowledged the FIN
packet.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

9.13 show tcp statistics
Use this command to show TCP statistics on received packets, three way handshake and time-wait.
show tcp parameter

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

N/A

9-14

Command Reference

Command

TCP Commands

Privileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example shows TCP parameters.

ExamplesRuijie# show tcp statistics
TCP Packets
Received: 1103
Errors : 0(checksum: 0)
Three way handshake
Request queue overflow: 0
Accept backlog full: 0
Web authentication limit per user: 0
Failed to alloc memory for request sock: 0
Failed to create open request child: 0
SYN ACK retransmits: 0
Timeouted requests: 0
Time-wait
Time-wait bucket table overflow: 0

Description of fields in the command output is as follows:
Field

Description

TCP Packets

Normal packets and error packets

Three way handshakeThree way handshake information, including session request count,server-client connection count, three way handshake failure countcaused by Web authentication limit, TCP socket failure count caused bymemory shortage, sub-session failure count, packet retransmission
count and session failure count caused by retransmission timeout.

Time-wait

RelatedCommands

Platform

Session in TIMEWAIT state

Command

Description

N/A

N/A

N/A

Description

9-15

Command Reference

IPv4/IPv6 REF Commands

10 IPv4/IPv6 REF Commands
10.1 clear ipv6 ref packet statistics
Use this command to clear IPv6 REF packet statistics.
clear ipv6 ref packet statistics

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example clears IPv6 REF packet statistics.

ExamplesRuijie# clear ipv6 ref packet statistics

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

10.2 show ip ref adjacency
Use this command to display the information about the specified adjacent node or all adjacent nodes.
show ip ref adjacency [ glean | local | ip-address | interface interface_type interface_number |discard | statistics ]Parameter

Parameter

Description

Description

glean

Aggregate adjacent node, which is used for a direct route

local

Local adjacent node, which is used by the local host

ip-address

Next-hop IP address

Interface_type

Interface typeInterface_number

Interface number

discardDisplays discarded adjacent nodes.

statistics

Statistics

10-1

Command Reference

IPv4/IPv6 REF Commands

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command can be used to display the information about the adjacent node table in the current
REF module. By specifying parameters, the information about the aggregate adjacent node, local
adjacent node, adjacent node of the specified IP address, adjacent node associated with thespecified interface, and all adjacent nodes can be displayed.

Configuration

The following example displays the information about all adjacent nodes in the adjacent node table.

ExamplesRuijie# show ip ref adjacency
id state

type

rfct chg ip

interfacelinklayer(header

data)
1 unresolved mcast
9 resolved

10

224.0.0.0

forward 1

0

192.168.50.78

VLAN 1 00 25 64 C5 9D 6A 00 D00

192.168.50.200

VLAN 1 00 04 5F 87 69 66 00 D0

F8 98 76 54 08 00
7 resolved

forward 1

F8 98 76 54 08 00
6 unresolved

glean 10

0.0.0.0

VLAN 1

4 unresolved

local 30

0.0.0.0

Local 1

Description of fields in the command output is as follows:
Field

DescriptionidAdjacent node ID
Adjacent node state:

state

Unresolved
Resolved
Adjacent node type
Local: local adjacency

type

Forward: forward adjacency
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency

rfct

Reference count of the adjacent nodechg

Whether the adjacent node is on the changing link.

ip

IP address of the adjacent nodeinterface

Interfacelinklayer

Layer 2 head

RelatedCommand

Description

Commands

show ip ref route

Displays all route information in the current REF module.

10-2

Command Reference

Platform

IPv4/IPv6 REF Commands

N/A

Description

10.3 show ip ref exact-route
This command is used to display the IPv4 REF exact route.
show ip ref exact-route source_ipaddress dest_ipaddress

Parameter
Description

Parameter

Description

source_ipaddress

Source IP address of the packet

dest_ipaddress

Destination IP address of the packet

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to specify the source and the destination IP address of the IP packets, and to
display the path of forwarding the current packet with REF

Configuration

The following example displays the IPv4 REF exact route from 192.168.217.74 to 192.168.13.1.

ExamplesRuijie# show ip ref exact-route 192.168.217.74 192.168.13.1
192.168.217.74 --> 192.168.13.1:
id state

type

rfct chg ip

interfacelinklayer(headerdata)
9 resolved forward 1

0

192.168.17.1

VLAN 1 00 25 64 C5 9D 6A 00 D0 F8

98 76 54 08 00

Description of fields in the command output is as follows:
Field

DescriptionidAdjacency ID
Adjacency state:

state

Unresolved
Resolved
Adjacency type
Local: local adjacency

type

Forward: forward adjacency
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency

10-3Command Reference

RelatedCommands

Platform

IPv4/IPv6 REF Commands

rfct

Reference count of the adjacency

chg

Whether the adjacency is on the changing link.

ip

Adjacency IP addressinterface

Interfacelinklayer

Layer 2 head

Command

Description

show ip ref route

Displays all routing information in the current REF module.

N/A

Description

10.4 show ip ref packet statistics
Use this command to display IPv4 REF packet statistics.
show ip ref packet statistics

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays IPv4 REF packet statistics.

ExamplesRuijie# show ip ref packet statistic
ref packet statistic:
bad head: 0

lookup fib fail : 0
local adj

: 0

glean adj

: 0

forward: 0

redirect: 0

punt adj: 0

outif not in ef : 0
ttl expiration : 0
no ip routing

: 0

10-4

Command Reference

IPv4/IPv6 REF Commands

Field

Description

total recved

Number of total packets received by REF

bad headNumber of the packets with false header

lookup fib failNumber of the packets with failed REF routing

drop adj

Number of the packets matching the dropped adjacency

local adj

Number of the packets matching the local adjacency

glean adj

Number of the packets matching the gleaned adjacency

forward

Number of the packets matching the forwarded adjacency
Number of the packets not allowed to be forwarded and sent to

no ip routing

RelatedCommands

Platform

local.

Command

Description

N/A

N/A

N/A

Description

10.5 show ip ref resolve-list
Use this command to display the IPv4 REF resolution information.
show ip ref resolve-list

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays IPv4 REF resolution information.

ExamplesRuijie# show ip ref resolve-list
IP

res_state flags interface

1.1.1.1

unres

1

VLAN 1

Field

Description

IP

IP address

10-5Command Reference

IPv4/IPv6 REF Commands

unres: unresolved

res_state

res: resolved
0: related to adjacency

flags

1: unrelated to adjacency

interface

Interface

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

10.6 show ip ref route
Use this command to display all the routing information in the IPv4 REF table.
show ip ref route [ default | ip mask | statistics ]Parameter
Description

Parameter

Description

default

Specifies the default route.

ip

Specifies the destination IP address of the routemask

Specifies the mask of the route.

statistics

Statistics

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to display the related routing information on the current REF table, and specify
the default route and all the routing information matching IP/MASK.

Configuration

The following example displays all the routing information in the IPv4 REF table.

ExamplesRuijie# show ip ref route
Codes: * - default route# - zero route
ip

mask

weightpath-idnext-hop

255.255.255.255 255.255.255.255 1 4

0.0.0.0

224.0.0.0

240.0.0.0

1224.0.0.0

224.0.0.0

255.255.255.0

1 4

192.168.50.0

255.255.255.0

1

192.168.50.255

1

0.0.0.0
6

255.255.255.255 1 2interface
Local 0Local 00.0.0.0 VLAN 1
0.0.0.0

192.168.50.200 255.255.255.255 1 7 192.168.50.200 VLAN 1

10-6

Command Reference

RelatedCommands

IPv4/IPv6 REF Commands

192.168.50.122

255.255.255.255 1 4 0.0.0.0

192.168.50.78

255.255.255.255 1 9 192.168.50.78 VLAN 1

Field

Description

ip

Destination IP address

mask

Mask

path-id

Adjacent identity

next-hop

Address of next hopweightRouting weightinterfaceEgressCommand

Description
Displays the accurate REF forwarding path ofshow ip ref exact-route

Platform

Local 0an IP packet.

N/A

Description

10.7 show ipv6 ref adjacency
Use this command to display the information about the IPv6 adjacent node.
show ipv6 ref adjacency [ glean | local | ipv6-address | interface interface_type interface_number |discard | statistics ]Parameter

Parameter

Description

Description

glean

Aggregate adjacent node, which is used for a direct route

local

Local adjacent node, which is used by the local host

ipv6-address

Next-hop IP addressinterface_type

Interface typeinterface_number

Interface number

discardDisplays discarded adjacent nodes.

statistics

Statistics

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command can be used to display the information about the adjacent node table in the privileged
EXEC mode and global configuration mode.

10-7

Command Reference

IPv4/IPv6 REF Commands

Configuration

The following example displays the information about the IPv6 adjacent node.

ExamplesRuijie# show ipv6 ref adjacency
id

state

type

rfct chg ip

interfacelinklayer(header

data)
1

unresolved glean

1

0

::

VLAN 1

2

unresolved local

2

0

::1

Local 1

Description of fields in the command output is as follows:
Field

DescriptionidAdjacent node ID
Adjacent node state:

state

Unresolved
Resolved
Adjacent node type
Local: local adjacency

type

Forward: forward adjacency
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency

rfct

Reference count of the adjacent nodechg

Whether the adjacent node is on the changing link.

ip

IP address of the adjacent nodeinterface

Interfacelinklayer

Layer 2 headFor distributed routers, id is divided into two fields, namely, gid and lid, standing for global adjacentnode ID and local adjacent node ID respectively.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

10.8 show ipv6 ref exact-route
This command is used to display the IPv6 REF exact route.
show ipv6 ref exact-route source-ipv6-address destination-ipv6-address

Parameter

Parameter

Description

10-8

Command Reference

Description

IPv4/IPv6 REF Commands

source-ipv6-address

Source IP address of the packet

destination-ipv6-address

Destination IP address of the packet

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the IPv4 REF exact route from 2001:db8:1::1 to 3001:db8:2::2.

ExamplesRuijie# show ipv6 exact-route 2001:db8:1::1 3001:db8:2::2
2001:db8:1::1 --> 3001:db8:2::2:
ID state

type

rfct chg ip interface

3

glean

1

unresolve0

linklayer(header data):: VLAN 1

Description of fields in the command output is as follows:
Field

DescriptionidAdjacent node ID
Adjacent node state:

state

Unresolved
Resolved
Adjacent node type
Local: local adjacency
Forward: forward adjacency

type

Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency

rfct

Reference count of the adjacent nodechg

Whether the adjacent node is on the changing link.

ip

IP address of the adjacent nodeinterface

Interfacelinklayer

Layer 2 head

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

10-9Command Reference

IPv4/IPv6 REF Commands

10.9 show ipv6 ref packet statistics
Use this command to display IPv6 REF packet statistics.
show ipv6 ref packet statistics

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays IPv6 REF packet statistics.

ExamplesRuijie# show ipv6 ref packet statistics
ref packet statistic:
bad head: 0

lookup fib fail : 0
local adj

: 0

glean adj

: 0

forward: 0

redirect: 0

hop-limit expiration : 0
no ipv6 unicast-routing

Field

Description

bad headNumber of the packets with false header

lookup fib failNumber of the packets with failed REF routing

drop adj

Number of the packets matching the dropped adjacency

local adj

Number of the packets matching the local adjacency

glean adj

Number of the packets matching the gleaned adjacency

forward

Number of the packets matching the forwarded adjacency

no ip routing

RelatedCommands: 0

Number of the packets not allowed to be forwarded and sent tolocal.

Command

Description

N/A

N/A

10-10

Command Reference

Platform

IPv4/IPv6 REF Commands

N/A

Description

10.10 show ipv6 ref resolve-list
This command is used to display the IPv6 REF resolution information.
show ipv6 ref resolve-list

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays IPv6 REF resolution information.

ExamplesRuijie#show ipv6 ref resolve-list
IP

res_state flags interface

1000::1

unres

1

VLAN 1

Field

Description

IP

IPv6 addressunres: unresolved

res_state
res: resolved
0: related to adjacency
flags
1: unrelated to adjacency
interface

RelatedCommands

Platform

Interface

Command

Description

N/A

N/A

N/A

Description

10-11

Command Reference

IPv4/IPv6 REF Commands

10.11 show ipv6 ref route
Use this command to display all the routing information in the IPv6 REF table.
show ipv6 ref route [ default | statistics | prefix/len ]Parameter
Description

Parameter

Description

default

Specifies the default route.

statistics

Statistics

prefix/len

Displays the route with the specified prefix (X:X:X:X::X/<0-128>).

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to display all routing information in the IPv6 REF table.

Configuration

The following example displays all the routing information in the REF IPv6 table.

ExamplesRuijie#show ipv6 ref route
Codes: * - default routeprefix/len

weight path_id

2001:da8:ffe:2::/64

1

3

::

VLAN 1

2001:da8:ffe:2::3/128

1

2

::1

Local 1

fe80::/101fe80::21a:a9ff:fe3b:fa41/128

RelatedCommands

next_hop interface

6
1

::
2

Null 0::1

Field

Description

prefix/len

IPv6 prefix and prefix length.

path-id

Adjacent identity

next-hop

Address of next hopweightRouting weightinterface

Interface

Command

Description

N/A

N/A

10-12

Local 1

IP Routing Configuration Commands
1. RIP Commands(beta)
2. RIPng Commands(beta)
3. NSM Commands(beta)
4. Keys(beta)
5. Routing Policies(beta)

Command Reference

RIP Commands

1 RIP Commands(beta)

1.1 auto-summary
Use this command to enable automatic summary of RIP routes. Use the no form of thiscommand to disable this function
auto-summary
no auto-summary

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

Automatic summary of RIP routes is enabled by default

Command Mode

Routing progress configuration mode

Usage Guide

Automatic RIP route summary means the subnet routes will be automatically summarized into
the routes of the classified network when they traverse through the subnet. Automatic routesummary is enabled by default for RIPv1 and RIPv2.
Automatic RIP route summary improves the flexibility and effectiveness of the network. If thesummarized route exists, the sub-routes contained in the summarized route cannot be seen in
the routing table, reducing the size of the routing table significantly.
Advertising the summarized route is more efficient than advertising individual routes in light of
the following factors:
The summarized route is always processed preferentially when you query the RIP
database.



Any sub-route is ignored when you query the RIP database, reducing the processing time.



If you want to learn the specific sub-routes instead of the summarized route, disable theautomatic route summary function. Only when RIPv2 is configured, the automatic routesummary function can be disabled. For the RIPv1, the automatic route summary function isalways enabled.
The range of the supernet route is wider than that of the classful network. Therefore, thiscommand takes no effect on the supernet route.

Configuration

The following example disables automatic route summary of RIPv2.

ExamplesRuijie (config)# router rip
Ruijie (config-router)# version 2
Ruijie (config-router)# no auto-summary

RelatedCommand

Description

1-1

Command Reference

RIP Commands

Commands
Defines the RIP software versions: v1 or v2.

versionPlatform

Both v1 and v2 are supported by default.

N/A

Description

1.2 default-information originate
Use this command to generate a default route in the RIP progress. Use the no form of this command
to delete the generated default route.
default-information originate [ always | metric metric-value | route-map route-map-name ] *no default-information originate [ always | metric metric-value | route-map route-map-name ] *Parameter
Description

Parameter

alwaysmetric metric-value

route-map map-nameDefaults

Description(Optional) Enables RIP to generate the default route, no matter
whether the default route exists or not.
(Optional) Sets the original metric value of the default route with thevalue ranging from 1 to 15.
(Optional) Indicates the name of the associated route-map.
Route-map is not associated by default.

No default route is generated by default.
The default metric value is 1.

CommandMode

Routing process configuration mode

Usage Guide

By default, RIP will not advertise the default route if the default route exists in the routing table of therouter. In this case, use the default-information originate command to notify the neighbor of thedefault route.
With the parameter always configured, no matter whether the default route exists in the RIP routing
process or not, the default route will be advertised to the neighbor but is not shown in the local routing
table. You can use the show ip rip database command to view the RIP routing information database
to confirm whether the default route is generated.
Use the parameter route-map to control more about the default route advertised to RIP. For
example, use the set metric command to set the metric value of the default route.
The route-map set metric rule takes precedence over the parameter metric value configuration of thedefault route. If the parameter metric is not configured, the default metric value is used by the default
route.
If the default route can be generated in the RIP process by using this command, RIP will notlearn the default route advertised from the neighbor.

1-2Command Reference

RIP Commands

For the default route generated by using the ip default-network command, thedefault-information originate command is required to add the default route to RIP.

Configuration

The following example generates a default route to the RIP routing table.

ExamplesRuijie(config-router)# default-information originate always

RelatedCommands

Command

Description

ip rip default-information

Notifies the default route through an interface.
Redistributes the routes from other protocols to

redistribute

Platform

RIP.

N/A

Description

1.3 default-metric
Use this command to define the default RIP metric value. Use the no form of this command to restore
the default setting.
default-metric metric-value
no default-metricParameter
Description

Parameter

Description
Indicates the default metric value with the range from 1 to 16. If themetric-value

metric value is greater than or equal to 16, the RGNOS regards theroute unreachable.

Defaults

The default is 1.

CommandMode

Routing process configuration mode

Usage Guide

This command needs to work with the command redistribute. When the routes are redistributed to
the RIP routing process from a routing protocol process, the route metric value cannot be converted
due to the incompatibility of the metric calculation mechanisms for different protocols. During theconversion, therefore, it is required to redefine the metric values of redistributed routes in the RIP
routing domain. If there is no clear definition of the metric value in redistributing a routing protocol
process, the RIP uses the metric value defined with default-metric. If the metric value is defined, thisvalue overwrites the metric value defined with default-metric. If this command is not configured, thedefault value of default-metric is 1.

Configuration

The following example enables the RIP routing protocol to redistribute the routes learned by the static

Examplesrouting protocol, whose initial RIP metric value is set to 3.
Ruijie (config)# router rip

1-3

Command Reference

RIP Commands

Ruijie (config-router)# default-metric 3
Ruijie (config-router)# redistribute static

RelatedCommands

Command

Description
Redistributes the routes from one routing

redistribute

Platform

domain to another routing domain.

N/A

Description

1.4 distanceUse this command to set the management distance of the RIP route. Use the no form of thiscommand to restore the default setting.
distance distance [ ip-address wildcard ]no distance [ distance ip-address wildcard ]Parameter
Description

Parameter

distance
ip-address
wildcard

Defaults

Description
Sets the management distance of a RIP route, an integer in the range
from 1 to 255.
Indicates the prefix of the source IP address of the route.
Defines the comparison bit of the IP address, where 0 means
accurate matching and 1 means no comparison.

The default is 120.

CommandMode

Routing process configuration mode

Usage Guide

Use this command to set the management distance of the RIP route.
You can use this command to create several management distances with source address prefixes.
When the source address of the RIP route is within the range specified by the prefixes, thecorresponding management distance is applied; otherwise, the route uses the management distanceconfigured by the RIP.

Configuration

The following example sets the management distance of the RIP route to 160, and specifies the

Examplesmanagement distance of the route learned from 192.168.2.1 as 123.
Ruijie(config)# router rip
Ruijie(config-router)# distance 160
Ruijie(config-router)# distance 123 192.168.12.1 0.0.0.0

RelatedCommands

Command

Description

1-4

Command Reference

RIP Commands

N/A

Platform

N/A

N/A

Description

1.5 distribute-list in
Use this command to control route update for route filtering. Use the no form of this command torestore the default setting.
distribute-list { [ access-list-number | name ] | [ prefix prefix-list-name ] [ gateway prefix-list-name ] }in [ interface-type interface-number ]no distribute-list { [ access-list-number | name ] | [ prefix prefix-list-name ] [ gateway
prefix-list-name ] } in [ interface-type interface-number ]Parameter
Description

Parameteraccess-list-number | name

Description
Specifies the ACL. Only the routes that are allowed by the ACL canbe accepted.

prefix prefix-list-name

Uses the prefix list to filter the routes.

gateway prefix-list-name

Uses the prefix list to filter the source of the routes.

interface-type
interface-number(Optional) Applies the distribution list only to a specified interface.

Defaults

The distribution list is not defined by default.

CommandRouting process configuration mode

Mode

Usage Guide

To deny receiving some specified routes, you can process all the received route update packets byconfiguring the route distribute control list.
Without any interface specified, the system will process the route update packets received on all theinterfaces.

Configuration

The following example enables RIP to control the routes received from the GigabitEthernet 0/17, only

Examplespermitting the routes starting with 172.16.0.0/16.
Ruijie (config)# router rip
Ruijie (config-router)# network 200.168.23.0
Ruijie (config-router)# distribute-list 10 in GigabitEthernet 0/17
Ruijie (config-router)# no auto-summary
Ruijie (config-router)# access-list 10 permit 172.16.0.0 0.0.255.255

RelatedCommands

Command

Description

access-list

Defines the ACL rule.

prefix-list

Defines the prefix list.

1-5

Command Reference

Platform

RIP Commands

N/A

Description

1.6 distribute-list out
Use this command to control route update advertisement for filtering routes. Use the no form of thiscommand to restore the default setting.
distribute-list { [ access-list-number | name ] | prefix prefix-list-name } out [ interface-type
interface-number | connected | rip | static ]no distribute-list { [ access-list-number | name ] | prefix prefix-list-name } out [ interface |[connected | rip | static ] ]Parameter
Description

Parameter

Description

access-list-number | nameSpecifies the ACL.

prefix prefix-list-name

Uses the prefix list to filter routes.

interfaceconnected

rip

staticDefaults(Optional) Applies route update advertisement control to a specified
interface in the distribution list.
(Optional) Applies route update advertisement control to only
connected routes in this distribution list.
(Optional) Applies route update advertisement control to only RIP
routes in this distribution list.
(Optional) Applies route update advertisement control to only static
routes in this distribution list.

No route update advertisement is configured by default.

CommandMode

Routing process configuration mode

Usage Guide

If this command relates to none of optional parameters, route update advertisement control applies toall interfaces. If this command relates to interface options, route update advertisement control applies
to only the specified interface. If this command relates to other route process parameters, route
update advertisement control applies to only the specific route process.

Configuration

The following example advertises only the 192.168.12.0/24 route.

ExamplesRuijie (config)# router rip
Ruijie (config-router)# network 200.4.4.0
Ruijie (config-router)# network 192.168.12.0
Ruijie (config-router)# distribute-list 10 out
Ruijie (config-router)# version 2
Ruijie (config-router)#access-list 10 permit 192.168.12.0 0.0.0.255

RelatedCommand

Description

1-6

Command Reference

RIP Commands

Commands

Platform

access-list

Defines the ACL rule.

prefix-list

Defines the prefix list.

redistribute

Configures route redistribution.

N/A

Description
Platform

N/A

Description

1.7 enable mib-binding
Use this command to bind a MIB with a specified RIP instance. Use the no form of this command torestore the default setting.
enable mib-binding
no enable mib-binding

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

N/A

CommandMode

Routing process configuration mode.

Usage Guide

As RIP MIB does not have RIP instance information, you can only operate only one RIP instanceusing SNMP.

Configuration

The following example operates the RIP instance.

ExamplesRuijie(config)# router rip
Ruijie(config-router)# enable mib-binding

RelatedCommands

Platform

Command

Description

show ip rip

Displays the global configuration of RIP.

N/A

Description

1.8 graceful-restart
Use this command to configure the RIP graceful restart (GR) function for a device. Use the no form of
this command to restore the default configuration.
graceful-restart [ grace-period grace-period ]no graceful-restart [ grace-period ]1-7

Command Reference

Parameter
Description

RIP Commands

Parameter

Description

grace-period(Optional) Configures the grace period.
(Optional) Indicates the user-defined GR period.

grace-period

The default value is the smaller value between twice the update timeand 60 seconds.
The range is from 1 to 1,800. The unit is second.

Defaults

This function is enabled by default.

CommandMode

Routing process configuration mode

Usage Guide

The GR function is configured on the RIP instances. Different parameters can be configured for
different RIP instances.
The GR period refers to the time from the startup to the end of RIP GR. During this period, theforwarding table remains unchanged and the RIP route is restored to the state before protocol restart.
When the GR period expires, RIP exits the GR state and performs normal RIP operation.
The graceful-restart grace-period command enables users to modify GR period. Note: Make surethat GR is completed before the RIP route is validate and after an RIP route update cycle elapses. If
an improper value is configured, non-stop data forwarding cannot be ensured during the GR process.
For example, if the GR period is longer than the time when the neighbor’s route is unavailable and GR
is not completed before the route is validated, then the neighbor is not re-informed of the route andforwarding of the neighbor’s route is terminated when it is validated, which results in data forwarding
interruption. Therefore, unless otherwise specified, it is not recommended to adjust the GR period. If
the period needs to changed, determine that the grace period is longer than the route update cycle
and shorter than the time when the route is unavailable in combination with the configuration of thetimers basic command.
During the RIP GR period, the network must be stable.

Configuration

The following example enables the RIP GR function and configures the GR period parameters of the

ExamplesGR function.
Ruijie(config)# router rip
Ruijie(config-router)# graceful-restart grace-period 90

RelatedCommands

Platform

Command

Description

timers basic

Configures RIP timers.

N/A

Description

1-8

Command Reference

RIP Commands

1.9 ip rip authentication key-chain
Use this command to enable RIP authentication and specify the keychain used for RIP authentication.
Use the no form of this command to restore the default setting.
ip rip authentication key-chain name-of-keychain
no ip rip authentication key-chain

Parameter
Description

Parametername-of-keychain

Defaults

Description
Indicates the name of the keychain, which specifies the keychain
used for RIP authentication.

The keychain is not associated by default.

CommandMode

Interface configuration mode

Usage Guide

If the keychain is specified in the interface configuration, use the key chain global configurationcommand to define the keychain. Otherwise, RIP data packet authentication fails.
RIPv2 instead of RIPv1 supports authentication of the RIP data packet.

Configuration

The following example enables RIP authentication on the vlan 1 with the associated keychain

Examplesripchain.
Ruijie(config)#interface vlan 1
Ruijie(config-if-VLAN 1)#ip rip authentication key-chain ripchain

Meanwhile, use the key chain command to define this keychain in global configuration mode.
Ruijie(config)#key chain ripchain
Ruijie(config-keychain)#key 1
Ruijie(config-keychain-key)#key-string Hello

RelatedCommands

Command

Description

ip rip authentication mode

Defines the RIP authentication mode.
Enables RIP authentication, and sets the
password string of RIP plaintext authentication.

ip rip authentication text-password

RIP data packet authentication is supported
only by RIPv2.
Defines the version of RIP packets received on

ip rip receive version

the interface.
Defines the version of RIP packets sent on theip rip send version

interface.
Defines the keychain and enters keychain

key chainconfiguration mode.

1-9

Command Reference

Platform

RIP Commands

N/A

Description

1.10 ip rip authentication modeUse this command to define the RIP authentication mode. Use the no form of this command torestore the default setting.
ip rip authentication mode { text | md5 }no ip rip authentication mode

Parameter
Description

Defaults

Parameter

Description

text

Configures RIP authentication as plaintext authentication.

md5

Configures RIP authentication as MD5 authentication.

It is plaintext authentication by default.

CommandMode

Interface configuration mode

Usage Guide

During the RIP authentication configuration process, the RIP authentication modes of all devices
requiring exchange of RIP routing information must be the same. Otherwise, RIP packet exchange
will fail.
If the plaintext authentication mode is adopted, but the password string of the plaintext authenticationor the associated keychain is not configured, no authentication occurs. In the same way, if the MD5authentication mode is adopted, but the associated keychain is not configured, no authentication
occurs.
RIPv2 instead of RIPv1 supports authentication of the RIP data packet.

Configuration

The following example configures the RIP authentication mode on the vlan 1 as MD5.

ExamplesRuijie (config)#interface vlan 1
Ruijie (config-if-VLAN 1)# ip rip authentication mode md5

RelatedCommands

Command

Description
Enables the RIP authentication mode andspecifies the keychain used for RIP

ip rip authentication key-chainauthentication. Only RIPv2 supports
authentication of the RIP data packet.
Enables the RIP authentication mode, and sets
the password string of RIP plaintext

ip rip authentication text-password

authentication. Only RIPv2 supports
authentication of the RIP data packet.
Defines the keychain and enters the keychain

key chainconfiguration mode

1-10

Command Reference

Platform

RIP Commands

N/A

Description

1.11 ip rip authentication text-password
Use this command to enable RIP authentication and set the password string of RIP plaintext
authentication. Use the no form of this command to restore the default setting.
ip rip authentication text-password [ 0 | 7 ] password-string
no ip rip authentication text-password

Parameter
Description

Parameter

Description

0

Specifies that the key is displayed as plaintext.

7

Specifies that the key is displayed as cipher text.

password-string

Defaults

Indicates the password string of the plaintext authentication, in thelength of 1-16 bytes.

No password string of RIP plaintext authentication is configured by default.

CommandMode

Interface configuration mode

Usage Guide

This command works only in plaintext authentication mode.
To enable the RIP plaintext authentication function, use this command to configure the corresponding
password string, or use the associated key chain to obtain the password string. The latter takes theprecedence over the former one.
RIPv1 does not support RIP authentication but RIPv2 does.

Configuration

The following example enables the RIP plaintext authentication on vlan 1 and sets the password

Examplesstring to hello.
Ruijie(config)#interface vlan 1
Ruijie(config-if-VLAN 1)# ip rip authentication text-password hello

RelatedCommands

Command

Description

ip rip authentication mode

Defines the RIP authentication mode.
Enables the RIP authentication mode andspecifies the keychain used for RIP

ip rip authentication key-chainauthentication. Only RIPv2 supports
authentication.

Platform

N/A

Description

1-11

Command Reference

RIP Commands

1.12 ip rip default-information
Use this command to advertise the default route through a RIP interface. Use the no form of thiscommand to restore the default setting.
ip rip default-information { only | originate } [ metric metric-value ]no ip rip default-information

Parameter
Description

Parameter

Description

only

Notifies the default route rather than other routes.

originate

Notifies the default route and other routes.

metric metric-value

Defaults

Specifies the metric value of the default route, in the range from1 to
15.

No default route is configured by default. The default metric value is 1.

CommandMode

Interface configuration mode

Usage Guide

After you configure this command on a specified interface, a default route is generated and notified
through the interface. If the ip rip default-information command of the interface and thedefault-information originate command of the RIP process are configured at the same time, only
the default route of the interface is advertised.
RIP will no longer learn the default route notified by the neighbor if any interface is configured
with the ip rip default-information command.

Configuration

The following example creates a default route which is notified on vlan 1 only.

ExamplesRuijie(config)#interface vlan 1
Ruijie(config-if-VLAN 1)#ip rip default-information only

RelatedCommands

Platform

Command

Description

default-information originate

Generates a default route in the RIP process.

N/A

Description

1.13 ip rip receive enable
Use this command to enable RIP to receive the RIP data package on a specified interface. Use theno form of this command to restore the default setting.
ip rip receive enable
no ip rip receive enable

Parameter

Parameter

Description

1-12

Command Reference

RIP Commands

Description
N/A

Defaults

N/A

RIP packages can be received through the interface by default.

CommandMode

Interface configuration mode

Usage Guide

To prevent an interface from receiving RIP packets, use the no form of this command in interface
configuration mode. This command works on interfaces configured with this command. You can use
the default form of this command to enable the interface to receive the RIP data package.

Configuration

The following example prohibits receiving RIP data packages on vlan 1.

ExamplesRuijie (config)# interface vlan 1
Ruijie (config-if-VLAN 1)# no ip rip receive enable

RelatedCommands

Command

Description
Enables or disables the interface to send RIP

ip rip send enable

data packages.
Configures a passive RIP interface.

passive-interface

Platform

N/A

Description

1.14 ip rip receive version
Use this command to define the version of RIP packets received on an interface. Use the no form of
this command to restore the default setting.
ip rip receive version [ 1 | 2 ]no ip rip receive version

Parameter
Description

Defaults

Parameter

Description

1(Optional) Receives only RIPv1 packets.

2(Optional) Receives only RIPv2 packets.

The default behavior depends on the configuration with the version command.

CommandMode

Interface configuration mode

Usage Guide

This command overwrites the default configuration of the version command. It affects only RIP
packet receiving through the interface and allows RIPv1 and RIPv2 packets to be received on theinterface at the same time. If the command is configured without parameters, data package receiving

1-13

Command Reference

RIP Commands

depends on the configuration of the version.

Configuration

The following example enables receiving both RIPv1 and RIPv2 data packages.

ExamplesRuijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# ip rip receive version 1 2

RelatedCommands

Command

Description
Defines the default version of the RIP packets

versionPlatform

received/sent on the interface.

N/A

Description

1.15 ip rip send enable
Use this command to enable RIP to send a RIP data package on a specified interface. Use the noform of this command to restore the default setting.
ip rip send enable
no ip rip send enable

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

RIP packages can be sent through the interface by default.

CommandMode

Interface configuration mode

Usage Guide

To prevent an interface from sending RIP packets, use the no form of this command in interface
configuration mode. This command works on interfaces configured with this command. You can use
the default form of this command to enable the interface to send the RIP data package.

Configuration

The following example prohibits sending RIP data packages on vlan 1.

ExamplesRuijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# no ip rip send enable

RelatedCommands

Command

Description
Enables or disables receiving RIP packets on

ip rip receive enable

the interface.
Configures a passive RIP interface.

passive-interface

Platform

N/A

1-14

Command Reference

RIP Commands

Description

1.16 ip rip send supernet-routes
Use this command to enable RIP to send the supernet route on a specified interface. Use the no formof this command to disable this function.
ip rip send supernet-routes
no ip rip send supernet-routes

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

This function is enabled by default.

CommandMode

Interface configuration mode

Usage Guide

When the RIPv1 router monitors a RIPv2 router response packet and if the supernet routing
information is monitored, incorrect route information is learned because the RIPv1 ignores the subnet
mask of the routing information. In this case, you are advised to use the no form of this command on
the RIPv2 router to disable advertising the supernet route on the corresponding interface. This
command works only on interfaces configured with this command.
This command is only valid upon sending the RIPv2 packets on the interface and it is used tocontrol sending the supernet route.

Configuration

The following example disables sending RIP supernet routes on the vlan 1 interface.

ExamplesRuijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# no ip rip send supernet-routes

RelatedCommands

Command

Description

versionDefines the RIP version
Enables or disables sending the RIP package

ip rip send enable

Platformon the interface.

N/A

Description

1.17 ip rip send version
Use this command to define the version of the RIP packets sent on the interface. Use the no form of
this command to restore the default setting.
ip rip send version [ 1 | 2 ]no ip rip send version

1-15

Command Reference

Parameter
Description

Defaults

RIP Commands

Parameter

Description

1(Optional) Receives only RIPv1 packets.

2(Optional) Receives only RIPv2 packets.

The default behavior depends on the configuration with the version command.

CommandMode

Interface configuration mode

Usage Guide

This command overwrites the default configuration of the version command. It affects only RIP
packet sending through the interface and allows RIPv1 and RIPv2 packages sent on the interface atthe same time. If the command is configured without parameters, package receiving depends on theconfiguration of the version.

Configuration

The following example enables sending both RIPv1 and RIPv2 packages on the VLAN 1 interface.

ExamplesRuijie (config)# interface vlan 1
Ruijie (config-if-VLAN 1)# ip rip send version 1 2

RelatedCommands

Command

Description
Defines the default version of the RIP packets

versionPlatform

received/sent on the interfaces.

N/A

Description

1.18 ip rip split-horizon
Use this command to enable split horizon. Use the no form of this command to disable this function.
ip rip split-horizon [ poisoned-reverse ]no ip rip split-horizon [ poisoned-reverse ]Parameter
Description

Defaults

Parameter

Description

poisoned-reverse(Optional) Enables split horizon with poisoned reverse.

This function is enabled by default.

CommandMode

Interface configuration mode

Usage Guide

When multiple devices are connected to the IP broadcast network and run a distance vector routing

1-16

Command Reference

RIP Commands

protocol, the split horizon mechanism is required to prevent loop. The split horizon prevents thedevice from advertising routing information from the interface that learns that information, which
optimizes routing information exchange between multiple devices.
For non-broadcast multi-path access networks (such as frame relay and X.25), split horizon may
cause some devices to be unable to learn all routing information. Split horizon may need to bedisabled in this case. If an interface is configured the secondary IP address, attentions shall be paid
also for split horizon.
If the poisoned-reverse parameter is configured, split horizon with poisoned reverse is enabled. In
this case, devices still advertise the route information through the interface from which the routeinformation is learned. However, the metric value of the route information is set to unreachable.
The RIP routing protocol is a distance vector routing protocol, and the split horizon issue shall be
cautioned in practical applications. If it is unsure whether split horizon is enabled on the interface, use
the show ip rip command to judge. This function makes no influence on the neighbor defined with theneighbor command.

Configuration

The following example disables the RIP split horizon function on the interface vlan 1.

ExamplesRuijie (config)# interface vlan 1
Ruijie (config-if-VLAN 1)# no ip rip split-horizon

RelatedCommands

Command

Descriptionneighbor (RIP)

Defines the IP address of the neighbor of RIP.
Enables the source address authentication ofvalidate-update-source

Platformthe RIP route update message.

N/A

Description

1.19 ip rip summary-address
Use this command to configure port-level convergence through an interface. Use the no form of thiscommand to disable this function.
ip rip summary-address ip-address ip-network-mask
no ip rip summary-address ip-address ip-network-mask

Parameter
Description

Parameter

Description

ip-address

Indicates the IP addresses to be converged.

ip-network-mask

Defaults

Indicates the subnet mask of the specified IP address for route
convergence.

The RIP routes are automatically converged to the classful network edge by default.

CommandMode

Interface configuration mode

1-17

Command Reference

Usage Guide

RIP Commands

The ip rip summary-address command converges an IP address or a subnet on a specified port.
RIP routes are automatically converged to the classful network edge. The classful subnet can be
configured through only port convergence.
The summary range configured by this command cannot be a super class network, that is, theconfigured mask length is greater than or equal to the natural mask length of the network.

Configuration

The following example disables the automatic route convergence function of RIPv2. Interface

Examplesconvergence is configured so that vlan 1 advertises the converged route 172.16.0.0/16.
Ruijie (config)# interface vlan 1
Ruijie (config-if-VLAN 1)# ip rip summary-address 172.16.0.0 255.255.0.0
Ruijie (config-if-VLAN 1)# ip address 172.16.1.1 255.255.255.0
Ruijie (config)# router rip
Ruijie (config-router)# network 172.16.0.0
Ruijie (config-router)# version 2
Ruijie (config-router)# no auto-summary

RelatedCommands

Command

Description
Enables the automatic convergence of RIP

auto-summary

Platformroutes.

N/A

Description

1.20 ip rip triggered
Use this command to enable triggered RIP based on links. Use the no form of this command torestore the default setting.
ip rip triggered [ retransmit-count count | retransmit-timer timer ]no ip rip triggered [ retransmit-count | retransmit-timer ]Parameter
Description

Parameter

Description
Configures the maximum number of times Update Request andretransmit-count countUpdate Response packets are retransmitted. The range is from 1 to3600. The default is 36.
Configures the interval at which the Update Request and Update

retransmit-timer timer

Response packets are retransmitted. The range is from 1 to 3,600, in
seconds. The default is 5.

Defaults

This function is disabled by default.

Command

Interface configuration mode

1-18

Command Reference

RIP Commands

Mode

Usage Guide

Triggered RIP (TRIP) is the extension of RIP on the wide area network (WAN), mainly used for
demand-based links.
With the TRIP function enabled, RIP no longer sends route updates periodically and sends route
updates to the WAN interface only if:Update Request packets are received.



RIP routing information is changed.

Interface state is changed.

The router is started.

As periodical RIP update is disabled, the confirmation and retransmission mechanism is required toensure that update packets are sent and received successfully over the WAN. The retransmit-timer
and retransmit-count commands can be used to specify the retransmission interval and maximum
retransmission times for request and update packets.
The function can be enabled in the case of the following conditions: a) The interface has only
one neighbor. b) There are multiple neighbors but they interact information using unicast
packets. You are advised to enable the function for link layer protocols such as PPP, frame
relay, and X.25.
You are advised to enable split horizon with poison reverse on the interface enabled with thefunction; otherwise invalid routing information might be left.
Make sure that the function is enabled on all routers on the same link; otherwise the function will
be invalid and the routing information cannot be exchanged correctly.
The function cannot be enabled at the same time with BFD and RIP functions.
To enable the function, make sure that the RIP configuration is the same on both ends of thelink, such as RIP authentication and the RIP version supported by the interface.
If this function is enabled on this interface, the source address of packets on this interface will bechecked no matter whether the source IP address verification function (validate-update-source)
is enabled.

Configuration

The following example enables TRIP and sets the retransmission interval and the maximum number

Examplesof retransmission times to 10 seconds and 18 respectively for Update Request and Update Response
packets.
Ruijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# ip rip triggered
Ruijie(config-if-VLAN 1)# ip rip triggered retransmit-timer 10
Ruijie(config-if-VLAN 1)# ip rip triggered retransmit-count 18

RelatedCommands

Command

Description
Displays the summarized routing information ofshow ip rip database

the RIP database.

1-19

Command Reference

Platform

RIP Commands

show ip rip interface

Displays the RIP interface information.

ip rip split-horizon

Configures RIP split horizon.

N/A

Description

1.21 ip rip v2-broadcast
Use this command to send RIPv2 packets in broadcast rather than multicast mode. Use the no formof this command to restore the default setting.
ip rip v2-broadcast
no ip rip v2-broadcast

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

By default, RIPv2 packets are sent in multicast mode on the interface.

CommandMode

Interface configuration mode

Usage Guide

If the links or neighbors do not support multicast, configure RIPv2 packets to be sent in broadcast
mode.

Configuration# The following example sends RIPv2 packets in broadcast mode instead of multicast mode on the

ExamplesLayer 3 Ethernet interface.
Ruijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# ip rip v2-broadcast

RelatedCommands

Platform

Command

Description

show ip rip interface

Displays the RIP interface information.

N/A

Description

1.22 neighbor
Use this command to define the IP address of a RIP neighbor. Use the no form of this command torestore the default setting.
neighbor ip-addressno neighbor ip-address

Parameter
Description

Parameter

Description

1-20

Command Reference

ip-address

Defaults

RIP Commands

Indicates the IP address of the neighbor. The IP address must be thatof the network connected to the local device.

The neighbor is not defined by default.

CommandMode

Routing process configuration mode

Usage Guide

By default, RIPv1 uses the IP broadcast address (255.255.255.255) to advertise routing information,
and RIPv2 uses the multicast address 224.0.0.9 to do so. If you do not want to allow all the deviceson the broadcast network or non-broadcast multi-path access network to receive routing information,
use the passive-interface command to configure related interfaces as passive interfaces and thendefine only some neighbors who can receive the routing information. This command has no impact on
the receiving of RIP information. The passive interface is configured. No request packet is sent after
the interface is enabled.

Configuration

The following RIP advertises routing information to neighbor IP address 192.168.1.2 only.

ExamplesRuijie(config)# router rip
Ruijie(config-router)# passive-interface default
Ruijie(config-router)# neighbor 192.168.1.2

RelatedCommands

Platform

Command

Description

passive-interface

Configures the interface as a passive interface.

N/A

Description

1.23 network
Use this command to define the list of networks to be advertised in the RIP routing process. Use theno form of this command to delete the defined network.
network network-number [ wildcard ]no network network-number [ wildcard ]Parameter
Description

Parameter

Description
Indicates the network number of the directly-connected network. The

network-number

network number is a natural one. All interfaces whose IP addresses
belong to that natural network can send/receive RIP packages.

wildcard

Defaults

Defines the IP address comparing bit: 0 refers to accurate matching,and 1 refers to no comparison.

N/A

1-21

Command Reference

RIP Commands

CommandMode

Routing process configuration mode

Usage Guide

The network-number and wildcard parameters can be configured simultaneously to enable the IP
address of the interface within the IP address range to join RIP running.
Without the wildcard parameter, RGOS make the interface IP address within the classful address
range join the RIP running.
Only when the IP address of an interface is in the network list defined by RIP, RIP route update
packets can be received and sent on the interface.

Configuration

The following example defines two network numbers associated with RIP and allows the interface IP

Examplesaddress between 192.168.12.0/24 and 172.16.0.0/24 to join RIP running.
Ruijie (config)# router rip
Ruijie (config-router)# network 192.168.12.0
Ruijie(config-router)# network 172.16.0.0 0.0.0.255

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.24 offset-list
Use this command to increase the metric value of received or sent RIP routes. Use the no form of thiscommand to restore the default setting.
offset-list { access-list-number | name } { in | out } offset [ interface-type interface-number ]no offset-list { access-list-number | name } { in | out } offset [ interface-type interface-number ]Parameter
Description

Parameter

Description

access-list-number | nameSpecifies the ACL.

in

Modifies the metric of the received routes using the ACL.

out

Modifies the metric of the sent routes using the ACL.

offsetIndicates the offset of changed metric values. The value is in therange from 0 to16.

Defaults

interface-type

Applies the ACL to a specified interface.

interface-number

Specifies the interface number.

No offset is specified by default.

CommandMode

Routing process configuration mode

1-22

Command Reference

Usage Guide

RIP Commands

If a RIP route matches against both the offset-list of the specified interface and the global offset-list, it
will increase the metric value of the offset-list of the specified interface.

Configuration

The following example increases the metric of the RIP routes by 7 in the range specified by ACL 7.

ExamplesRuijie (config-router)# offset-list 7 out 7
The following example increases the metric of the RIP routes by 7 in the range specified by ACL 7
and learned by vlan 1.
Ruijie (config-router)# offset-list 8 in 7 vlan 1

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.25 output-delay
Use this command to modify the delay to send RIP update packets. Use the no form of this command
to restore the default setting.
output-delay delay
no output-delay

Parameter
Description

Parameter

Description

delay

Sets the delay to send RIP update packets, in the range from 8 to 50
in the unit of milliseconds.

Defaults

No sending delay is configured by default.

CommandMode

Routing process configuration mode

Usage Guide

In normal cases, the size of a RIP update packet is 512 bytes including 25 routes. If the number of
updated routes is greater than 25, update packets will be sent through multiple routes. Note that the
update packets should be sent as fast as possible.
However, when a high-speed device sends a large number of packets to a low-speed device, thelow-speed device may not process all the packets timely, resulting in packet loss. In this case, you
can use this command to increase the delay to send packets on the high-speed device so that thelow-speed device can process all the update packets.

Configuration

The following example sets the delay to send RIP update packets to 30 milliseconds.

ExamplesRuijie(config)# router rip
Ruijie(config-router)# output-delay 30

1-23

Command Reference

RelatedCommands

Platform

RIP Commands

Command

Description

N/A

N/A

N/A

Description

1.26 passive-interface
Use this command to disable the function of sending update packets on an interface. Use the no formof this command to restore the default setting.
passive-interface { default | interface-type interface-num }no passive-interface { default | interface-type interface-num }Parameter
Description

Defaults

Parameter

Description

default

Sets all interfaces to the passive interfaces.

interface-type interface-num

Indicates the interface type and number.

Interfaces are set to the non passive interfaces by default.

CommandMode

Routing process configuration mode

Usage Guide

The passive-interface default command sets all interfaces to the passive interfaces. You can use
no passive-interface interface-type interface-num command to set specified interfaces as
non-passive interfaces.
After you set an interface to the passive interface, RIP route update packets will no longer be sent but
can be received through the interface. In this case, route update packets can be sent to a specified
neighbor through the interfaces by using the neighbor command. You can use the ip rip send
enable and ip rip receive enable commands to control whether route update packets can be sent or
received through the interface.

Configuration

The following example sets all interfaces to the passive interfaces and then sets vlan 1 to the

Examplesnon-passive interface.
Ruijie(config-router)# passive-interface default
Ruijie(config-router)# no passive-interface vlan 1

RelatedCommands

Command

Description

ip rip receive enable

Enables or disables receiving RIP packets on
the interface.
Enables or disables sending RIP packets on

ip rip send enable

the interface.

1-24

Command Reference

Platform

RIP Commands

N/A

Description

1.27 redistribute
Use this command to redistribute external routes in route configuration mode. Use the no form of thiscommand to restore the default setting.
redistribute { connected | static } [ metric metric-value | route-map route-map-name ] *no redistribute { connected | static } [ metric | route-map route-map-name ] *Parameter
Description

Parameter

Description

connected

Is redistributed from a connected route.

staticIs redistributed from static routes.
Sets the metric value of the redistributed route and specifies themetric metric-value

metric value by using the metric-value parameter. The value is in therange from 1 to 16.

route-map route-map-nameDefaults

Sets the redistribution filtering rule.

By default, external routes are not redistributed to RIP. The metric of the redistributed routes is 1 bydefault.
The route-map is not associated.

CommandMode

Routing process configuration mode

Usage Guide

This command is executed to redistribute external routes to RIP.
It is unnecessary to convert the metric of one routing protocol into that of another routing protocol forroute redistribution, since different routing protocols use different metric measurement methods.
However, a symbolic metric value must be set for route redistribution. Otherwise, route redistribution
will fail.
The rule of configuring the no form of the redistribute command is as follows:
1. If the no form of this command specifies certain parameters, the parameters must be restored tothe default configuration.
2. If the no form of this command does not specify any parameter, the command must be deleted.
The redistribute command cannot redistribute the default route of other protocol to the RIP
process. To this end, use the default-information originate command.

Configuration

The following example redistributes static routes to RIP.

ExamplesRuijie(config-router)# redistribute static

RelatedCommands

Command

Description

1-25

Command Reference

RIP Commands

Sets the default metric of the route to bedefault-metric metric

redistributed.
Generates the default route in the RIP process.

default-information originate

Platform

N/A

Description

1.28 router rip
Use this command to create the RIP routing process and enter the routing process configuration
mode. Use the no form of this command to restore the default setting.
router rip
no router rip

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

No RIP process is running by default.

CommandMode

Global configuration mode

Usage Guide

One RIP routing process must be defined with one network number. If a dynamic routing protocol
runs on asynchronous lines, configure the async default routing command on the asynchronousinterface.

Configuration

The following example creates the RIP routing process and enters the routing process configuration

Examplesmode.
Ruijie (config)# router rip
Ruijie(config-router)#

RelatedCommands

Command

Description
Defines the network number of the RIP

network (RIP)

Platformprocess.

N/A

Description

1.29 show ip rip
Use this command to display the RIP process information.
show ip rip

Parameter

Parameter

Description

1-26

Command Reference

RIP Commands

Description
N/A

Defaults

N/A

N/A

CommandMode

All CLI user modes except user EXEC mode

Usage Guide

It is used to display the three timers, routing distribution status, routing re-distribution status, interface
RIP version, RIP interface and network range, metric, and distance of the RIP process quickly.

Configuratio

The following example displays the basic information of the RIP process such as the update time andn Examples

management distance.
Ruijie(config)#show ip rip
Routing Protocol is "rip"Sending updates every 30 seconds
Invalid after 180 seconds, flushed after 120 seconds
Outgoing update filter list for all interface is:distribute-list 10 out
Incoming update filter list for all interface is: not set
Redistribution default metric is 3
Redistributing: static
Default-information originate always
Default version control: send version 2, receive version 2
Routing for Networks:
172.16.0.0 255.255.255.0
192.168.12.0 255.255.255.0
200.4.4.0 255.255.255.0
192.168.1.2
Distance: 160 (default is 120)
Address

Distance List

192.168.12.1/32

123Graceful-restart enabled
Restart grace period 90 secs
Ruijie(config)#

Description of fields in the command output is as follows:
Field

Description

Sending updates

Packet update time

Invalid

Invalid time

flushedRefresh time

Outgoing update filter list for all interface

Filter all sent routes

Incoming update filter list for all interface

Filter all received routes

Default redistribution metric

Redistribution metric by default

1-27

Command Reference

RelatedCommands

Platform

RIP Commands

Redistributing

Redistribution protocol

Default version control

RIP version of instance by default

Routing for Networks

Routing segment advertised by RIP

Distance

Management distance of instance

Graceful-restart

Whether GR is enabled

Restart grace period

GR timeCurrent Restart remaining time

Remaining GR time

Command

Description

N/A

N/A

N/A

Description

1.30 show ip rip database
Use this command to display the route summary information in the RIP routing database.
show ip rip database [ network-number network-mask | count ]Parameter
Description

Parameter

Description(Optional) Indicates the ID of the subnet on which route

network-number

information is to be displayed.
Indicates the subnet mask. It must be specified if the

network-mask

network number is specified.
(Optional) Displays the abstract of the route statistics in the

countDefaults

RIP database.

N/A

CommandMode

All CLI user modes except user EXEC mode

Usage Guide

Only when the related sub-routes are converged, the converged address entries appear in the RIP
routing database. When the last sub-route information in the converged address entries becomes invalid,
the converged address information will be deleted from the database.

Configuratio

The following example displays all converged address entries in the RIP routing database.

n Examples

Ruijie# show ip rip database
192.168.1.0/24

auto-summary

192.168.1.0/30

directly connected, Loopback 3

192.168.1.8/30

directly connected, VLAN 1

192.168.121.0/24

auto-summary

1-28Command Reference

RIP Commands

192.168.121.0/24

redistributed[1] via 192.168.2.22, VLAN 2
192.168.122.0/24

auto-summary

192.168.122.0/24

The following example displays the converged address entries related with 192.168.121.0/24 in the RIP
routing database.
Ruijie# show ip rip database 192.168.121.0 255.255.255.0
192.168.121.0/24

redistributed[1] via 192.168.2.22, VLAN 1

The following example displays the statistical information summary of various routes in the RIP routing
database.
Ruijie# show ip rip database count
All

Valid

Invalid

database550

auto-summary

5

5

0

connected

1

1

0

rip

4

4

0

Description of fields in the command output is as follows:

RelatedCommands

Field

Description

auto-summary

Summarized routes

directly connected

Directed-connected routes

redistributed

Redistributed routes

database

RIP route database

All

Count of all routes

Valid

Count of valid routes

Invalid

Count of invalid routes

Command

Description
Displays the information of the currently-runningshow ip rip

Platformrouting protocol process.

N/A

Description

1.31 show ip rip external
Use this command to display the information of the external routes redistributed by the RIP protocol.
show ip rip external [ connected | static ]Parameter

Parameter

Description

1-29

Command Reference

RIP Commands

Description

Defaults

connected

Displays redistributed directly-connected routes.

static

Displays redistributed static routes.

N/A

CommandMode

All CLI user modes except user EXEC mode

Usage Guide

N/A

Configuratio

The following example displays direct routes redistributed by the RIP process.

n Examples

Ruijie# show ip rip external
Protocol connected route:[connected] 192.100.3.0/24 metric=0
nhop=0.0.0.0, if=2
[connected] 192.101.1.0/24 metric=0
nhop=0.0.0.0, if=3
Protocol static route:[static] 10.1.1.1/32 metric=0
nhop=0.0.0.0, if=4096[static] 10.1.2.1/32 metric=0
nhop=0.0.0.0, if=4096

Description of fields in the command output is as follows:

RelatedCommands

Field

Description

Protocol connected route

Type of redistributed routeconnected

Redistributed route

metricRedistributed route metricnhop

Next hop of redistributed routeif

Outbound interface of redistributed route

Command

Description
Displays the information of the currently runningshow ip rip

routing protocol process.
Creates a VRF.

ip vrf

Platform

N/A

Description

1.32 show ip rip interface
Use this command to display the RIP interface information.
show ip rip interface [ interface-type interface-number ]1-30

Command Reference

Parameter
Description

RIP Commands

Parameter

Description(Optional) Displays the specified interface type andinterface-type interface-number

Defaults

interface number.

N/A

CommandMode

All CLI user modes except user EXEC mode

Usage Guide

This command is used to display the information about RIP interfaces. If no RIP interface exists, noinformation is displayed.

Configuratio

The following example displays the RIP interface information.

n Examples

Ruijie# show ip rip interface
GigabitEthernet 0/17 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv2 packets only
Send RIPv2 packets only
Recv RIP packet total: 0
Send RIP packet total: 3
Passive interface: Disabled
Split Horizon with Poisoned Reverse: Enabled
Triggered RIP Enabled:
Retransmit-timer: 5, Retransmit-count: 36
V2 Broadcast: Disabled
Multicast registe: Registed
Interface Summary Rip:
Not Configured
Authentication mode: Text
Authentication key-chain: ripk1
Authentication text-password: ruijie
Default-information: only, metric 5
IP interface address:
192.168.64.100/24, next update due in 14 seconds
2.2.1.1/24, next update due in 24 seconds
neighbor 2.2.1.6, next update due in 3 seconds
neighbor 2.2.1.77, next update due in 13 seconds
2.2.2.57/24, next update due in 16 seconds

Description of fields in the command output is as follows:
Field

Description

Receive RIPv1 and RIPv2 packets

Packet types that the interface can receive

Send RIPv1 packets only

Packet types that the interface can send

1-31

Command Reference

RelatedCommands

RIP Commands

Receive RIP packet

Whether the interface can receive packets

Send RIP packet

Whether the interface can send packets

Passive interface

Whether the passive port is enabled

Send RIP supernet routes

Whether the interface can send supernet routes

Recv RIP packet total

Total number of packets received on the interface

Send RIP packet total

Total number of packets sent by the interface

Split Horizon with Poisoned Reverse

Whether split horizon poison is enabled

Triggered RIP

Whether the Triggered function is enabled

Retransmit-timer

Retransmission time

Retransmit-count

Retransmission count

V2 Broadcast

V2 broadcast packet

Multicast register

Whether multicast is registered

Interface Summary Rip

Whether summary is enabled on the interface

Authentication mode

Authentication mode

Authentication key-chain

Key chain used for authentication

Authentication text-password

Authentication string

Default-information

Default metric, route and other information

IP interface address

IP address of the interface

Command

Description
Displays the information of the currently

show ip rip

Platformrunning routing protocol process.

N/A

Description

1.33 show ip rip peer
Use this command to show the RIP peer information. RIP records a summary for the RIP routing
information source learnt (source addresses of RIP route update packets) for the convenience of user
monitoring. This routing information source is called RIP neighbor information.
show ip rip peer [ ip-address ]Parameter
Description

Defaults

Parameter

Description

ip-address(Optional) Displays the IP address of a specified RIP neighbor.

N/A

CommandMode

All CLI user modes except user EXEC mode

Usage Guide

This command is used to display the RIP neighbor information. If no RIP neighbor exists, no information
will be displayed.

1-32

Command Reference

RIP Commands

Configuratio

The following example displays the RIP neighbor information.

n Examples

Ruijie# show ip rip peerPeer 192.168.3.2:
Local address: 192.168.3.1
Input interface: GigabitEthernet 0/17
Peer version: RIPv1
Received bad packets: 3
Received bad routes: 0

Description of fields in the command output is as follows:

RelatedCommands

Field

Description

Peer

Neighbor IP address

Local address

Local address

Input interface

Connected interface

Peer version

RIP version of neighbor

Received bad packets

Wrong packets received from neighbor

Received bad routes

Wrong routes

Command

Description
Displays the information of the routing protocol

show ip rip

Platformprocess that is running.

N/A

Description

1.34 timers basic
Use this command to adjust the RIP clock. Use the no form of this command to restore the default
setting.
timers basic update invalid flushno timers basic

Parameter
Description

Parameter

Description
Indicates the route update time in seconds. The update keyword
defines the period at which the device sends route update packets.

updateEach time an update packet is received, the "Invalid" and "Flush"
clocks are reset. By default, a route update packet is sent every 30
seconds.

1-33

Command Reference

RIP Commands

Indicates the route invalid time in seconds, starting from the last valid
update packet. The "invalid" defines the period when the route in therouting table becomes invalid due to no update. The invalid period ofinvalidroute shall be at least three times the route update period. If no
update packet is received within the route invalid period, the relatedroute becomes invalid and enters into the "invalid" state. If an update
packet is received within the period, the clock resets. By default, theInvalid time is 180 seconds.
Indicates the route flushing time in seconds, starting when a RIP
route enters into the invalid status. When the flush time is due, theflushroutes in the invalid status will be cleared out of the routing table. The
default Flush time is 120 seconds.

Defaults

By default, the update time is 30 seconds, the invalid time is 180 seconds, and the flushing time is
120 seconds.

CommandMode

Routing process configuration mode

Usage Guide

Adjusting the above clocks may speed up routing protocol convergence and fault recovery. Devices
connected to the same network must have consistent RIP clock values. Adjustment of RIP clocks is
not recommended unless otherwise specified.
To check the current RIP clock parameters, use the show ip rip command.
If you set the clock to a small value on low-speed links, some risks will be caused because
numerous update packets may use up the bandwidth. In general, the clocks can be configured
with smaller values on Ethernet or the lines of above 2 Mbit/s to reduce the convergence time ofroutes.

Configuration

The following example enables the RIP update packets that are sent every 10 seconds. If no update

Examplespacket is received within 30 seconds, related routes become invalid and enter the invalid status.
When another 90s elapses, they will be cleared.
Ruijie (config)# router rip
Ruijie (config-router)# timers basic 10 30 90

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.35 validate-update-source
Use this command to validate the source address of the received RIP route update packet. Use the

1-34Command Reference

RIP Commands

no form of the command to disable this function.
validate-update-source
no validate-update-source

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

This function is enabled by default.

CommandMode

Routing process configuration mode

Usage Guide

You can validate the source address of the RIP route update packet. The validation aims to ensurethat the RIP routing process receives only the route update packets from the same IP subnet
neighbor.
Disabling split horizon on the interface causes the RIP routing process to enable update message
source address validation, no matter whether it has been configured with thevalidate-update-source command in routing process configuration mode.
In addition, for the ip unnumbered interface, the RIP routing process does not implement update
message source address validation, no matter whether it has been configured with the command
validate-update-source.

Configuration

The following example disables verification of the source IP address of the update packet.

ExamplesRuijie (config)# router rip
Ruijie (config-router)# no validate-update-source

RelatedCommands

Platform

Command

Description

ip split-horizon

Enables split horizon.

ip unnumbered

Defines the IP unnumbered interface.

neighbor (RIP)

Defines the IP address of a RIP neighbor.

N/A

Description

1.36 version
Use this command to define the RIP version of a device. Use the no form of this command to restore
the default setting.
version { 1 | 2 }no version

Parameter
Description

Parameter

Description

1-35

Command Reference

Defaults

RIP Commands

1

Defines the RIP version 1.

2

Defines the RIP version 2.

The route update packets of RIPv1 and are received by default, but only the RIPv1 route update
packets are sent.

CommandMode

Routing process configuration mode

Usage Guide

This command defines the RIP version running on the device. It is possible to redefine the messagesof which RIP version are processed on every interface by using the ip rip receive version and ip rip
send version commands.

Configuration

The following example configures the RIP version as version 2.

ExamplesRuijie (config)# router rip
Ruijie (config-router)# version 2

RelatedCommands

Command

Description

ip rip receive

Defines the version of RIP packets received on

versionthe interface.
Defines the version of RIP packets sent on theip rip send version

interface.
Displays RIP information.

show ip rip

Platform

N/A

Description

1-36

Command Reference

2 RIPng Commands

RIPng Commands(beta)(beta)

2.1 clear ipv6 rip
Use this command to clear the RIPng routes.
clear ipv6 rip

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

None

CommandPrivileged EXEC mode

mode

Usage Guide

Running this command removes all RIPng routes and this operation may have great impact on the
RIPng protocol. This command should be used with caution.

Configuration

The following example clears the RIPng routes:

ExamplesRuijie# clear ipv6 rip

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.2 default-metric
Use this command to configure the default metric for RIPng. Use the no form of this command torestore the default value.
default-metric metricno default-metricParameter
Description

Parameter

Description

metricSets the default metric value. The valid range is from 1 to 16. The
route is unreachable if the metric value is larger than or equal to 16.

Defaults

The default value is 1.

CommandRouting process configuration mode.

2-1

Command Reference

RIPng Commands(beta)

mode

Usage Guide

This command shall be used with the redistribute command. When redistributing the route from one
route process to RIPng, due to the incompatibility of metric calculation mechanisms of different
routing protocols, it fails to translate the routing metric values. To this end, the RIPng metric value
shall be defined when translating the metric values. If there is no defined metric value, use thedefault-metric command to define one; and the defined metric value will overwrite the value of thedefault-metric command. By default, the default-metric value is 1.

Configuration

The following example shows how to set the RIPng metric value as 3 when redistributing static

Examplesprocess 100:
Ruijie(config-router)# default-metric 3

RelatedCommands

Command

Description

redistribute

Redistributes the route from one route domain
to another route domain.

Platform

N/A

Description

2.3 distanceUse this command to set the administrative distance of RIPng. Use the no form of this command torestore the default value.
distance distanceno distanceParameter
Description

Parameter

Description

distance

Sets the RIPng administrative distance. The range is from 1 to 254.

Defaults

The default distance is 120

CommandRouting process configuration mode.

mode

Usage Guide

N/A

Configuration

The following example shows how to set the RIPng administrative distance as 160:

ExamplesRuijie(config)# ipv6 router rip
Ruijie(config-router)# distance 160

RelatedCommands

Command

Description

2-2

Command Reference

RIPng Commands(beta)

N/A

Platform

N/A

N/A

Description

2.4 distribute-list
Use this command to filter the in/out route in the prefix list. Use the no form of this command to
remove route filtering.
distribute-list prefix-list prefix-list-name { in | out } [ interface-type interface-name ]no distribute-list prefix-list prefix-list-name { in | out } [ interface-type interface-name ]Parameter
Description

Parameter

Description

prefix-list prefix-list-name

Name of the prefix list which is used to filter the route.

in | out

Filters the in or out route in the distribute list.

interface-type
interface-name(Optional) Applies the distribute list to the specified interface.

Defaults

By default, no distribute list is defined.

CommandRouting process configuration mode.

mode

Usage Guide

This command is used to configure the route distribution control list to filter all update routes for the
purpose of refusing to receive or send the specified routes. If the interface is not specified, the update
routes on all interfaces are filtered.

Configuration

The following example shows how to filter the received update route on the interface vlan 1 (only

Examplesthose update routes within the prefix-list allowpre prefix list range can be received)
Ruijie(config)# ipv6 router rip
Ruijie(config-router)# distribute-list prefix-list allowpre in vlan 1

RelatedCommands

Platform

Command

Description

redistribute

Sets route redistribution.

N/A

Description

2.5 graceful-restart
Use this command to configure the graceful restart (GR) function for the RIPng process.
graceful-restart [ grace-period grace-period ]Use the no form of this command restore the default configurations.

2-3

Command Reference

RIPng Commands(beta)

no graceful-restart [ grace-period ]Parameter
Description

Parameter

Description

grace-period

Displays the configured grace period.

grace-period

Defaults

CommandMode

Indicates the configured GR period, ranging from 1 to 1800 seconds.
The default value is the smaller between twice of the update time and 60s.

The GR function is enabled by default.

Routing process configuration mode

Default Level

14

Usage Guide

The GR function is configured based on RIPng instances. Different parameters can be configured for
different RIPng instances as required.
The GR period indicates the maximum duration from RIPng restart to RIPng GR completion. In this time
period, the forwarding table before restart is used and the RIPng route is restored to the status before
restart. After the GR period expires, the RIPng process exits the GR status and the common RIPng
operation is performed.
The graceful-restart grace-period command allows a user to modify the GR period in explicit mode. Notethat GR is completed and the RIPng route is updated once before the RIPng route becomes invalid. If the
GR period is improperly set, continuous data forwarding in the GR process cannot be ensured. A typicalcase is as follows:
If the GR period is greater than the invalid time of the neighbor route, GR is not completed before the route
becomes invalid and the route is not advertised to the neighbor again. The neighbor route stops forwarding
data after the route becomes invalid, resulting in data forwarding interruption. Therefore, unless otherwise
specified, it is not recommended to adjust the GR period. If the GR period needs to be configured, checkconfiguration of the timers command to ensure that the GR period value is greater than the route update
time and smaller than the route invalid time.
When GR is performed for the RIPng process, ensure that the network environment is stable.

Configuration

The following example enables the GR function for the RIPng process and configures the GR period.

ExamplesRuijie(config)# ipv6 router rip
Ruijie(config-router)# graceful-restart grace-period 90

Verification

Run the show ipv6 rip command to check whether the GR function is configured and query the configured
grace period.

Prompts

CommonErrors

N/A

N/A

2-4

Command Reference

Platform
Description

RIPng Commands(beta)

N/A

2.6 ipv6 rip default-information
Use this command to generate a default IPv6 route to the RIPng. Use the no form of this command to
remove the default route.
ipv6 rip default-information { only | originate} [ metric metric-value ]no ipv6 rip default-information

Parameter
Description

Parameter

Description

only

Advertises the IPv6 default route only.

originate

Advertises both of the IPv6 default route and other routes.

1. metric
metric-value

Sets the metric value for the default route. The valid range is from 1 to
15. The default metric is 1.

Defaults

By default, no default route is configured.

Command

Interface configuration mode

mode

Usage Guide

With this command configured on an interface, the interface advertises an IPv6 default route and theroute itself is not to join the device route forwarding table and the RIPng route database.
To avoid the route loop, once this command has been configured on the interface, RIPng refuses toreceive the default route update message advertised from the neighbor.

Configuration

The following example shows how to create a default route to the RIPng routing process on the

Examplesinterface vlan 1 and enable this interface to advertise the default route only:1
Ruijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# ipv6 rip default-information only

RelatedCommands

Platform

Command

Description

show ipv6 rip

Displays the RIPng process and statistics.

show ipv6 rip database

Displays the RIPng route.

N/A

Description

2.7 ipv6 rip enable
Use this command to enable the RIPng on the interface. Use the no form of this command to disable
RIPng on the interface.
ipv6 rip enable2-5

Command Reference

RIPng Commands(beta)

no ipv6 rip enable

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

It is disabled by default.

Command

Interface configuration mode.

mode

Usage Guide

This command is used to add the RIPng interface. Before this command is configured, if the RIPng is
not enabled, use this command to enable the RIPng automatically.

Configuration

The following example shows how to enable the RIPng on the interface vlan 1:

ExamplesRuijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# ipv6 rip enable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.8 ipv6 rip metric-offset
Use this command to set the interface metric value. Use the no form of this command to remove themetric configurations.
ipv6 rip metric-offset value
no ipv6 rip metric-offset

Parameter
Description

Parameter

Description

value

Sets the interface metric value on the interface. The valid range isfrom 1 to 16.

Defaults

The default value is 1.

Command

Interface configuration mode.

mode

Usage Guide

Before the route is added to the routing list, the interface metric value shall be upon the route metric.
To this end, the interface metric value influences the route usage.

2-6

Command Reference

RIPng Commands(beta)

Configuration

The following example shows how to set the metric value of the interface vlan 1 as 5:

ExamplesRuijie(config)# interface vlan 1
Ruijie(config-if-vlan 1)# ipv6 rip metric-offset 5

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.9 ipv6 router rip
Use this command to create the RIPng process and enter routing process configuration mode. Use
the no form of this command to remove the RIPng process.
ipv6 router rip
no ipv6 router rip

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

No RIPng process is configured by default.

Command

Global configuration mode.

mode

Usage Guide

N/A.

Configuration

The following example shows how to create the RIPng process and enter routing process

Examplesconfiguration mode:
Ruijie(config)# ipv6 router rip
S2300(config-router)#

RelatedCommands

Platform

Command

Description

ipv6 rip enable

Enables the RIPng on the specified interface.

N/A

Description

2.10 passive-interface
Use this command to disable the interface to send update packets. Use the no form of this command

2-7

Command Reference

RIPng Commands(beta)

to enable the interface to send update packets.
passive-interface { default | interface-type interface-num }no passive-interface { default | interface-type interface-num }Parameter
Description

Parameter

Description

default

Enables the passive mode on all interfaces.

interface-type interface-num

Interface type and interface number.

Defaults

No passive interface is configured by default.

CommandRouting process configuration mode.

mode

Usage Guide

You can use the passive-interface default command to enable the passive mode on all interfaces.
Then, use the no passive-interface interface-type interface-num command to remove the specified
interface from the passive mode.

Configuration

The following example shows how to enable the passive mode on all interfaces and remove interface

Examplesvlan 1 from the passive mode:
Ruijie(config-router)# passive-interface default
Ruijie(config-router)# no passive-interface vlan 1

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.11 redistribute
Use this command to redistribute the route of other routing protocols to RIPng. Use the no form of thiscommand to remove the redistribution configuration.
redistribute { connected | static} [ metric metric-value | route-map route-map-name ] *no redistribute { connected | static} [ metric | route-map route-map-name ] *Parameter
Description

Parameter

Description

connected

Redistributes the connected routes to RIPng.

staticRedistributes the static routes to RIPng.

metric metric-value(Optional) Sets the metric value for the route redistributed to RIPng.

route-map route-map-name(Optional) Sets the redistribution route filtering.

2-8

Command Reference
Defaults

RIPng Commands(beta)

By default, the routes of other routing protocols are not redistributed.
If the default-metric command is not configured, the default metric value is 1;
By default, the route-map is not configured;
By default, all sub-type routes in the specified routing process are redistributed.

CommandRouting process configuration mode.

mode

Usage Guide

This command is used to redistribute the external routes to RIPng.
It is unnecessary to transform the metric of one routing protocol into another routing protocol in theprocess of the route redistribution, for the metric calculation methods of the different routing protocols
are different.
The instance, from where the routing information is redistributed to the RIPng, must be specified in
the process of configuring the multi-instance protocol redistribution.

Configuration

The following example shows how to redistribute the static route, use the route map mymap to filter

Examplesand set the metric value as 8:
Ruijie(config)# ipv6 router rip
Ruijie(config-router)# redistribute static route-map mymap metric 8

RelatedCommands

Command

Description
Defines the default RIPng metric value whendefault-metric

redistributing other routing protocols.
Filters the RIPng routing update packets.

distribute-list

Platform

N/A

Description

2.12 show ipv6 rip
Use this command to show the parameters and each statistical information of the RIPng routing
protocol process.
show ipv6 rip

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

All CLI user modes except user EXEC mode

mode

Usage Guide

N/A

2-9

Command Reference

RIPng Commands(beta)

Configuration

Ruijie# show ipv6 rip

ExamplesRouting Protocol is "RIPng"
Sending updates every 10 seconds with +/-50%, next due in 8 seconds
Timeout after 30 seconds, garbage collect after 60 seconds
Outgoing update filter list for all interface is:distribute-list prefix aa out
Incoming update filter list for all interface is: not set
Default redistribution metric is 1
Default distance is 120
Redistribution:
Redistributing protocol connected route-map rm
Redistributing protocol static
Redistributing protocol ospf 1
Default version control: send version 1, receive version 1
Interface

Send

VLAN 1

1

1

Loopback 1

1

1

Recv

Routing Information Sources:
None

Description of fields in the command output is as follows:

RelatedCommands

Field

Description

Sending update

Interval for sending updates

Timeout

Expiration time

garbage

Recovery time

Outgoing update filter list

Configured sending filtering table

Incoming update filter

Configured receiving filtering table

Default redistribution metricDefault redistribution metricdistance

Management distance

Redistribution

Redistribution routing protocol

Default version control

Default transceiver version

Interface

RIPng interface

Routing Information Sources:

Routing information

Command

Description

show ipv6 rip

Displays the parameters and each statisticalinformation of the RIPng process.

Platform

N/A

Description

2-10

Command Reference

RIPng Commands(beta)

2.13 show ipv6 rip database
Use this command to display the RIPng route entries.
show ipv6 rip database

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

All CLI user modes except user EXEC mode

mode

Usage Guide

N/A

Configuration

Ruijie# show ipv6 rip database

ExamplesCodes: R - RIPng,C - Connected,S - Static,O - OSPF,B - BGP
sub-codes:n - normal,s - static,d - default,r - redistribute,i - interface, a/s - aggregated/suppressedS(r)2001:db8:1::/64, metric 1, tag 0

Loopback 0/::S(r)2001:db8:2::/64, metric 1, tag 0

Loopback 0/::C(r)2001:db8:3::/64, metric 1, tag 0

VLAN 1/::S(r)2001:db8:4::/64, metric 1, tag 0

Null 0/::C(i)2001:db8:5::/64, metric 1, tag 0

Loopback 1/::S(r)2001:db8:6::/64, metric 1, tag 0

Null 0/::Description of fields in the command output is as follows:

RelatedCommands

Field

Description

codes

Route type and corresponding abbreviation

2001:db8:1::

Route prefix

metric 1

Route metrictag 0

Route label value

VLAN 1/::

Routing interface

Command

Description

N/A

N/A

2-11

Command Reference

Platform

RIPng Commands(beta)

N/A

Description

2.14 split-horizon
Use the split-horizon command to enable the RIPng split-horizon function in routing process
configuration mode. Use the no form of this command to disable this function. Use the split-horizon
poisoned-reverse command to enable the RIPng poisoned reverse horizontal split function in routing
process configuration mode. Use the no form of this command to disable this function.
split-horizon [ poisoned-reverse ]no split-horizon [ poisoned-reverse ]Parameter
Description

Parameter

Description

poisoned-reverse(Optional) Enables the poisoned-reverse horizontal split.

Defaults

RIPng split horizon is enabled by default.

CommandRouting process configuration mode.

mode

Usage Guide

In the process of packet updating, split-horizon function prevents some routing information from being
advertised through the interface learning those routing information. The poisoned reverse horizontal
split function advertises some routing information to the interface learning those routing information,and the metric value is set as 16. The RIPng routing protocol belongs to the distance vector routing
protocol, so the horizontal split shall be noticed in the actual application. You can use the show ipv6
rip command to determine whether the RIPng split-horizon function is enabled or not.

Configuration

The following example shows how to disable the RIPng horizontal split:

ExamplesRuijie(config)# ipv6 router rip
Ruijie(config-router)# no split-horizon

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.15 timers
Use this command to adjust the RIPng timer. Use the no form of this command to restore the default
settings.
timers update invalid flushno timers

2-12Command Reference

Parameter
Description

RIPng Commands(beta)

Parameter

Description

updateSets the routing update time, in seconds. The update parameter
defines the period of sending the routing update packets by thedevice. The invalid and flush parameter reset once the update
packets are received.

invalid

Sets the routing invalid time, in seconds, starting from receiving thelast valid update packet. The invalid parameter defines the invalid
time for the un-updated routing in the routing list. The routing invalid
time shall be three times larger than the routing update time. The
routing will be invalid if no update packets are received within therouting invalid time, and it will reset if the update packets are received
within the invalid time.

flush

Sets the routing flush time, in seconds, starting from RIPng entering
to invalid state. The invalid routing will be removed from the routing
list if the flush time expires.

Defaults

The default update time is 30 seconds; the default invalid time is 180 seconds; and the default flush
time is 120 seconds.

CommandRouting process configuration mode.

mode

Usage Guide

Adjusting the above time may speed up the RIPng convergence time and the troubleshooting time.
The RIPng time must be consistent for the devices connecting to the same network. You are notrecommended to adjust the RIP time, except for the specific requirement.
Use the show ipv6 rip command to view the current RIPng time parameter setting.
In the low-speed link, with the short time configured, large amount of the update packets consumes a
lot of bandwidth. Generally, the short time can be configured in the Ethernet or 2Mbps-higher line toshorten the convergence time of the network routing.

Configuration

The following example shows how to send the RIP update packets every 10 seconds. The routing will

Examplesbe invalid if no update packets are received within 30 seconds, and the routing will be removed after
being invalid for 90 seconds.
Ruijie(config)# ipv6 router rip
Ruijie(config-router)# timers 10 30 90

RelatedCommands

Command

Description
Displays the parameters and the statisticalshow ipv6 rip

information of the RIPng process.
Displays the RIPng routes.

show ipv6 rip database

2-13

Command Reference
Platform

RIPng Commands(beta)

N/A

Description

2-14

Command Reference

3 NSM Commands

NSM Commands(beta)(beta)

3.1 clear ip route
Use this command to clear the route cache.
clear ip route { * | network [ netmask ] }Parameter

Parameter

Description*

Clears all route cache.

networkSpecifies the route cache of the network or subnet.
(Optional) Subnet mask. If no subnet mask is specified,

Description
netmask

the longest match principle is used when you match
network with the route. The cache of the longest match iscleared.

CommandMode

Privileged EXEC mode

Usage

Clearing route cache clears the corresponding routes and triggers the routing protocol relearning.

Guide

Please note that clearing all route cache leads to temporary network disconnection.

The following example clears the cache of the route which is the longest match with IP address
Examples

192.168.12.0.
Ruijie# clear ip route 192.168.12.0

RelatedCommand

Description

Commands

N/A

N/A

Platform
Description

N/A

3.2 ip default-gateway
Use this command to configure the default gateway IP address. Use the no or default form of thiscommand to restore the default setting.
ip default-gateway ipv4-address
no ip default-gateway
default ip default-gateway

Parameter

Parameter

Description

Description

ipv4-address

IPv4 address of the default gateway

Defaults

No gateway IP address is configured by default.

3-1

Command Reference

NSM Commands(beta)

CommandMode

Global configuration mode

Usage

When the device does not know the destination address of a packet, the device will forward the packet toGuide

the default gateway.

ExamplesThe following example sets the IP address of default gateway to 192.168.1.1.
Ruijie(config)# ip default-gateway 192.168.1.1

RelatedCommand

Description

Commands

N/A

N/A

Platform
Description

N/A

3.3 ip default-network
Use this command to configure the default network globally. Use the no or default form of thiscommand to restore the default setting.
ip default-network network
no ip default-network network
default ip default-network network

Parameter

Parameter

Description

Description

network

Default network

Defaults

CommandMode

The default is 0.0.0.0/0.

Global configuration mode

The goal of this command is to generate the default route. The default network must be reachable in the
Usage
Guide

routing table, but not the directly connected network.
The default network always starts with an asterisk (“*”), indicating that it is the candidate of the default
route. If there is connected route and the route without the next hop in the default network, the default
route must be a static route.

The following example sets 192.168.100.0 as the default network. Since the static route to the network is
configured, the device will automatically generate a default route.
Ruijie(config)# ip route 192.168.100.0 255.255.255.0 vlan 1
ExamplesRuijie(config)# ip default-network 192.168.100.0

The following example sets 200.200.200.0 as the default network. The route becomes the default one
only when it is available in the routing table.

3-2

Command Reference

NSM Commands(beta)

Ruijie(config)# ip default-network 200.200.200.0

RelatedCommand

Description

Commands

show ip route

Displays the routing table.

3.4 ip route
Use this command to configure a static route. Use the no or default form of this command to restore
the default setting.
ip route network mask { ipv4-address [ global ] | interface [ ipv4-address [ global ] ] } [ distance |description description-text | [ disabled | enabled ] | [ permanent ] | tag tag | weight number ] *no ip route network net-mask { ip-address | interface [ ip-address ] } [ distance ]default ip route network net-mask { ip-address | interface [ ip-address ] } [ distance ]Parameter

Parameter

Description

network

Network address of the destination

net-mask

Mask of the destination

ipv4-address

The next hop IP address of the static routeglobal

(Optional) Indicates next hop address is global

interface(Optional) The next hop egress of the static routedistance(Optional) The administrative distance of the static routedescription description-text(Optional) Indicates the description of the static route. By

Description

default, no description is configured. description-text is astring of 1 to 60 characters.
disabled | enabled(Optional) Indicates the enable flag of the static route. The
flag is enabled by default.

permanent(Optional) Indicates the permanent route ID

tag tag(Optional) Indicates the tag of the static routeweight number(Optional) Indicates the weight of the static route. The
weight is 1 by default.

Defaults

CommandMode

No static route is configured by default.

Global configuration mode

The default administrative distance of the static route is 1. Setting the administrative distance allows
the learnt dynamic route to overwrite the static route. Setting the administrative distance of the static
route can enable route backup, which is called floating route in this case. For example, theUsage Guideadministrative distance of the RIP is 120. You can set its administrative distance to 125. Then thedata can switch over the static route when the route running RIP fails.
The default weight of the static route is 1. To view the static route of non default weight, execute theshow ip route weight command. The parameter weight is used to enable WCMP. When there are

3-3Command Reference

NSM Commands(beta)load-balanced routes to the destination, the device assigns data flows by their weights. The higher theweight of a route is, the more data flow the route carries. WCMP limit is generally 32 for routers. Whenthe sum of the weights of load balanced routes is beyond this weight limit, the excessive ones will nottake effect.
Enablement/disablement shows the state of the static route. Disablement means the static route is
not used for forwarding. The forwarding table used the permanent route until administrator deletes it.
When you configure the static route on an Ethernet interface, do not set the next hop as an interface,for example, ip route 0.0.0.0 0.0.0.0 vlan 1. In this case, the switch may consider that all unknown
destination networks are directly connected to the vlan 1. So it sends an ARP request to every
destination host, which occupies many CPU and memory resources. It is not recommended to set thestatic route to an Ethernet interface.

The following example adds a static route to the destination network of 172.16.100.0/24 whose next
hop is 192.168.12.1 and administrative distance is 155.
Ruijie(config)# ip route 172.16.199.0 255.255.255.0 192.168.12.1 155
ExamplesIf the static route has not a specific interface, data flows may be sent thought other interface in caseof interface failure. The following example configures data flows to be sent through vlan 1 to thedestination network of 172.16.100.0/24.
Ruijie(config)# ip route 172.16.199.0 255.255.255.0 vlan 1 192.168.12.1

RelatedCommands

N/A

3.5 ip routing
Use this command to enable IP routing in the global configuration mode. Use the no or default form of thiscommand to disable this function.
ip routing
no ip routing
default ip routing

Defaults

CommandMode

This function is enabled by default.

Global configuration mode

IP routing is not necessary when the switch serves as bridge or VoIP gateway.
When a device functions only as a bridge or VoIP gateway, the IP routing function of the RGOS
software is not required. In this case, the IP routing function of the RGOS software can be disabled.
Usage Guide

After the IP routing function is disabled, the device functions as a common host. The device can send
and receive packets but cannot forward packets. All route-related configurations will be deleted
except the static route configuration. A large number of static routes may be configured. If a user runs
the no ip routing command, the configuration of a large number of static routes may be lost. To

3-4

Command Reference

NSM Commands(beta)

prevent this situation, the static route configuration will be hidden temporarily when the no ip routing
command is run. If the ip routing command is run again, the static route configuration can berestored.
Note that if the process or whole system restarts when the no ip routing command is run, the static
route configuration will not be reserved.

ExamplesThe following example disables IP routing.
Ruijie(config)# no ip routing

RelatedCommands

N/A

Platform
Description

N/A

3.6 ip static route-limit
Use this command to set the upper threshold of the static route. Use the no or default form of thiscommand to restore the default setting.
ip static route-limit number
no ip static route-limit number
default ip static route-limit

Parameter

Parameter

Description

numberDefaults

The default is 1024.

CommandMode

Usage Guide

Description
Upper threshold of static routes in the range from 1 to
10000

Global configuration mode

The goal is to control the number of static routes. You can view the upper threshold of the configured
non-default static routes with the show running-config command.

The following example sets the upper threshold of the static routes to 900 and then restores the
Examplessetting to the default value.
Ruijie(config)# ip static route-limit 900

RelatedCommands

N/A

Platform

N/A

3-5

Command Reference

NSM Commands(beta)

Description

3.7 ipv6 default-gateway
Use this command to configure the default gateway IPv6 address on 2-layer devices. Use the no or default
form of this command to restore the default setting.
ipv6 default-gateway ipv6-address
no ipv6 default-gateway
default ipv6 default-gateway

Para
meter
Descr
iptionDefau
lts

Parameter

Description

ipv6-address

Sets the default gateway IPv6 address.

No gateway IPv6 address is configured by default.

Com
mand
Mode

Global configuration mode

Usag
e
Guide

When the device does not know the destination address of a packet, the device will forward thepacket to the default gateway. Use the command show ipv6 redirects to display default gateway
configuration.

Exam
ples

The following example sets the default gateway IPv6 address to 10::1.
Ruijie(config)# ipv6 default-gateway 10::1

Platform
Descr
iptionN/A

3.8 ipv6 route
Use this command to configure an ipv6 static route. Use the no or default form of this command to restore
the default setting.
ipv6 route ipv6-prefix / prefix-length { ipv6-address | interface [ ipv6-address ] } [ distance | description
description-text | tag tag | weight number ] *no ipv6 route ipv6-prefix / prefix-length { ipv6-address | interface [ ipv6-address ] } [ distance ]Parameter

Parameter

Description

3-6

Command Reference

Description

NSM Commands(beta)

prefix-length

Mask length of the destinationipv6-address

The next hop IP address of the static routeinterface(Optional) The next hop egress of the static routedistance(Optional) The administrative distance of the static route.
The default is 1.
(Optional) Indicates the description of the static route. By

description description-text

default, no description is configured. description-text is astring of 1 to 60 characters.

tag tag(Optional) Indicates the tag value of the static route. The
default is 0.
(Optional) Indicates the weight of the static route, whichmust be specified when you configure equal-cost routes.
The weight ranges from 1 to 8. When the weights of allweight number

equal-cost routes of a route are summed up, the sum
cannot exceed the maximum number of equal-cost routes
that can be configured for the route. Weighting ofequal-cost routes of a route indicates the traffic ratio ofthese routes. The weight is 1 by default.

Defaults

CommandMode

Usage Guide

No IPv6 static route is configured by default.

Global configuration mode

N/A

The following example adds a static route to the destination network of 2001::/64 whose next hop is
2002::2 and administrative distance are 115.
Ruijie(config)# ipv6 route 2001::/64 2002::2 115
ExamplesIf the static route has not a specific interface, data flows may be sent thought other interface in case ofinterface failure. The following example configures that data flows are sent through vlan 1 to thedestination network of 2001::/64.
Ruijie(config)# ipv6 route 2001::/64 vlan 1 2002::2

RelatedCommand

Description

Commands

show ipv6 route

Displays IPv6 routing table.

Platform
Description

N/A

3-7

Command Reference

NSM Commands(beta)

3.9 ipv6 static route-limit
Use this command to set the upper threshold of the static route. Use the no or default form of this command
to restore the default setting.
Ipv6 static route-limit number
no ipv6 static route-limit number
default ipv6 static route-limit

Parameter

Parameter

Description

numberDefaults

The default is 1000.

CommandMode

Usage Guide

Description
Upper threshold of static routes in the range from 1 to
10000.

Global configuration mode

The goal is to control the number of static routes. You can view the upper threshold of the configured
non-default static routes with the show running config command.

The following example sets the upper threshold of the ipv6 static routes to 900 and then restores the
Examplessetting to the default value.
Ruijie(config)# ipv6 static route-limit 900
Ruijie(config)# no ipv6 static route-limit

RelatedCommands

Command

Description

ipv6 route

Configures the IPv6 static route.

show ipv6 route

Displays the IPv6 routing table.

Platform
Description

N/A

3.10 ipv6 unicast-routing
Use this command to enable the IPv6 route function of the RGOS. Use the no or default form of thiscommand to disable this function.
ipv6 unicast-routing
no ipv6 unicast-routing
default ipv6 unicast-routing

Parameter
Description

N/A

3-8

Command Reference

Defaults

NSM Commands(beta)

This function is enabled by default.

CommandMode

Usage Guide

ExamplesRelatedCommands

Global configuration modeThis function can be disabled if the device is just used as the bridge-connection device or the VOIP
gateway device.

The example disables the IPv6 route function of RGOS.
Ruijie(config)# no ipv6 unicast-routing

Command

Description

ipv6 route

Configure the IPv6 static route.

show ipv6 route

Displays the IPv6 routing table.

Platform
Description

N/A

3.11 show ip redirects
Use this command to display the IPv4 default gateway IP address.
show ip redirects

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandMode

Usage Guide

All CLI user modes except user EXEC modeUse this command to display the default gateway IP address. This command is supported with the no
ip routing command executed.

The following example displays the default gateway.
Ruijie# show ip redirects
Default Gateway: 192.168.195.1
ExamplesField

Description

Default Gateway

IP address of the default gateway.

3-9

Command Reference

NSM Commands(beta)

RelatedCommand

Description

Commands

N/A

N/A

Platform
Description

N/A

3.12 show ip route
Use the commands to display the configuration of the IP routing table.
show ip route [ network [ mask [ longer-prefix ] ] | count | [ ecmp | normal ] [ network [ mask ] ] |protocol | weight ]Parameter
Description

Defaults

Parameter

Description

network(Optional) The route information to the network.

mask(Optional) The route information to the network of this mask.

longer-prefix(Optional) Displays the routes that match the specified prefix.
(Optional) Displays the number of existent routes. (For thecount

ECMP/WCMP route, it displays one route.)

ecmp

Displays only equivalent routes.

normalDisplays normal routes, instead of equivalent routes and fast reroutes.

protocol

(Optional) The route information of specific protocol.

weight(Optional) Displays the route information of non default weight.

All routes are displayed by default.

CommandMode

Usage Guide

All CLI user modes except user EXEC modeThis command can display route information flexibly.
This command shows all routes. To show different attributes of routes, specify normal or ecmp.

1.

The following example displays the configuration of the IP routing table.

Ruijie# show ip route
Codes: C - Connected, L - Local, S - Static
R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow routeN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
ExamplesE1 - OSPF external type 1, E2 - OSPF external type 2
SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
IA - Inter area, * - candidate default
Gateway of last resort is no set
S

20.0.0.0/8 is directly connected, VLAN 1

S

22.0.0.0/8 [1/0] via 20.0.0.1

3-10

Command Reference

NSM Commands(beta)

R40.0.0.0/8 [120/20] via 192.1.1.2, 00:00:23, VLAN 1

C

192.1.1.0/24 is directly connected, VLAN 1

C

192.1.1.254/32 is local host.

Description of fields in the command output is as follows:
Field

Description
Source routing protocol, which may be:
C: directly connected routeS

S: static route
R: RIP route
Network address and mask of the destination

20.0.0.0/8

network[1/0]

Administrative distance/metricVia 20.0.0.1

Next-hop IP address

00:00:06

Lifetime of protocol route

VLAN 1

Next-hop forwarding interface

2.

The following example displays the routing information of destination 30.0.0.0.

Ruijie# show ip route 30.0.0.0
Routing entry for 30.0.0.0/8
Distance 120, metric 20
Routing Descriptor Blocks:
192.1.1.1, 00:01:11 ago, via VLAN 1, generated by RIP

Description of fields in the command output is as follows:
Field

Description

distance

Route management distancemetricRoute metric
Display the next-hop IP address, routing

Routing Descriptor Blocks

source, update time, interface, source routing
protocol, type, BGP community attribute, etc.

00:01:11 ago

3.

Protocol routing lifetime

The following example displays the number of routes.

Ruijie# show ip route count--------- route info ---------the num of active route: 9

Description of fields in the command output is as follows:
Field

Description

the num of active route

Number of valid routes

Ruijie# show ip route weight

3-11

Command Reference

NSM Commands(beta)------------[distance/metric/weight]----------S

23.0.0.0/8 [1/0/2] via 192.1.1.20

S

172.0.0.0/16 [1/0/4] via 192.0.0.1

Description of fields in the command output is as follows:
Field

Description

S

Source routing protocol

distance

Route management distancemetricRoute metricweightRoute weight

RelatedCommand

Description

Commands

N/A

N/A

Platform
Description

N/A

3.13 show ip route summary
Use this command to display the statistical information about routing table.
show ip route summary [ all ]Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandMode

All CLI user modes except user EXEC mode

Usage

N/A

Guideline
1.

The following example displays the statistics of the global routing table.

Ruijie# show ip route summary
Codes: NORMAL - Normal route ECMP - ECMP route FRR - Fast-Reroute route
ExamplesIP routing table count: 0
Total
Memory: 756 bytes
Entries: 7, based on route prefixes

3-12Command Reference

NSM Commands(beta)
NORMAL

ECMP

FRR

TOTAL

0

0

6

Connected 6
Static

1

0

0

1

RIP

0

0

0

0

OSPF

0

0

0

0

ISIS

0

0

0

0

BGP

0

0

0

0

TOTAL

7

0

0

7

The following example displays the statistics of all routing tables.
Ruijie# show ip route summary all
Codes: NORMAL - Normal route ECMP - ECMP route FRR - Fast-Reroute route
IP routing table count: 0
Total
Memory: 756 bytes
Entries: 7, based on route prefixes
NORMAL

ECMP

FRR

TOTAL

Connected 6

0

0

6

Static

1

0

0

1

RIP

0

0

0

0

OSPF

0

0

0

0

ISIS

0

0

0

0

BGP

0

0

0

0

TOTAL

7

0

0

7

GlobalMemory: 756 bytes
Entries: 7, based on route prefixes
ECMP

FRR

TOTAL

Connected 6

NORMAL

0

0

6

Static

1

0

0

1

RIP

0

0

0

0

OSPF

0

0

0

0

ISIS

0

0

0

0

BGP

0

0

0

0

TOTAL

7

0

0

7

Description of fields in the command output is as follows:
Field

Description

3-13

Command Reference

NSM Commands(beta)

Type of the table entries. Value:
NORMAL: common routes (not ECMP or FRR);NORMALECMP: equivalent route;
FRR: fast reroute;
TOTAL: total

MemoryMemory occupied by the table.

EntriesNumber of entries (based on prefix, not next-hop)Protocol type. Value:
Connected: direct connection;
Static: static;
RIP: RIP;

Connected

OSPF: OSPF;
ISIS: ISIS;
BGP: BGP;TOTAL: total

RelatedCommand

Description

Commands

N/A

N/A

Platform
Description

N/A

3.14 show ipv6 redirects
Use this command to display the IPv6 default gateway IP address.
show ipv6 redirects

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandMode

Usage Guide

All CLI user modes except user EXEC mode

N/A

The following example displays the default gateway IPv6 address.
Ruijie# show ipv6 redirects
Default Gateway: 10::1
ExamplesField

Description

Default Gateway

IPv6 address of the default gateway

3-14

Command Reference

NSM Commands(beta)

RelatedCommand

Description

Commands

N/A

N/A

Platform
N/A

Description

3.15 show ipv6 route
Use the command to display the configuration of the IPv6 routing table.
show ipv6 route [ [ ipv6-prefix / prefix-length [ longer-prefixes ] | local | protocol | weight ] ]Parameter
Description

Defaults

Parameter

Description

ipv6-prefix/prefix-length(Optional) A prefix for route’s IPv6 address.
(Optional) Displays the route with an IPv6 address

longer-prefixes

prefix mostly matched.

local(Optional) Displays IPv6 local route.

protocol

(Optional) The route information of specific protocol.

weight(Optional) Displays the non-default-weight routes only.

All routes are displayed by default.

CommandMode

All CLI user modes except user EXEC mode

Usage Guide

Use this command to display route information.

The following example displays the output of this command.
Ruijie(config)# show ipv6 routeIPv6

routing table -Default - 7 entries

Codes: C - Connected, L - Local, S - Static
R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow routeN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ExamplesIA - Inter areaC

10::/64 via Loopback 1, directly connectedL

10::1/128 via Loopback 1, local hostS

20::/64 [20/0] via 10::4, Loopback 1C

C

FE80::/10 via Null 0, directly connected

C

FE80::/64 via Loopback 1, directly connected

L

FE80::2D0:F8FF:FE22:33AB/128 via Loopback 1, local host

3-15

Command Reference

NSM Commands(beta)

Description of fields in the command output is as follows:
Field

Description

Source routing protocol, which may be:
C: directly connected routeC

S: static route
R: RIP route

20::/64

Network address and mask of the destination network[20/0]

Administrative distance/metric

RelatedCommand

Description

Commands

ipv6 route

Configures the IPv6 static route.

Platform
Description

N/A

3.16 show ipv6 route summary
Use this command to display the statistics of the IPv6 routing table.
show ipv6 route summary [ all ]Parameter

Parameter

Description

Description

CommandMode

All CLI user modes except user EXEC mode

Usage Guide

N/A

The following example displays statistics of IPv6 routing table.
Ruijie#show ipv6 route summary
IPv6 routing table name is - Default(0) global scope - 0 entries
IPv6 routing table default maximum-paths is 1
ExamplesLocal

2

Connected

3

Static0RIP0------------------------

3-16

Command Reference

NSM Commands(beta)

Total

5

The following example displays the statistics of all IPv6 routing tables.
Ruijie# show ipv6 route summary all
IPv6 routing table count: 1
Total
Memory: 0 bytes
Entries: 0
Local:0,Connected:0,Static:0,RIP:0,OSPF:0,ISIS:0,BGP:0
GlobalMemory: 0 bytes
Entries: 0
Local:0,Connected:0,Static:0,RIP:0,OSPF:0,ISIS:0,BGP:0

Description of fields in the command output is as follows:
Field

Description

MemoryThe memory size occupied by the current routing
table.

Entries

The entries in the current routing table (based on
the entry prefix instead of the next hop entry.)

Connected

Describes the protocol type of the entry. The field
can be;Connected: Connected route entry.
Static: Static route entry.
RIP: RIP route entry.
OSPF: OSPF route entry.
ISIS: ISIS route entry.
BGP: BGP route entry.
TOTAL: Total number of all protocol entries.

IPv6 routing table countThe number of the routing tables.

GlobalThe name of the current routing table. The field
can be:Global : Global (The default VRF)
TOTAL: All VRF routing table summaries.

RelatedCommand

Description

Commands

N/A

N/A

Platform
Description

N/A

3-17

Command Reference

4 Keys Commands

Keys Commands(beta)(beta)

4.1 accept-lifetime
Use this command in the encryption key configuration mode to specify the lifetime of an encryption key
in its receiving direction. Use the no form of this command to restore the default value.
accept-lifetime start-time {infinite | end-time | duration seconds}
no accept-lifetime

Parameter

Parameter

Description

description

start-timeStart time of the lifetime. The syntax is as follows:
hh:mm:ss month date year
hh:mm:ss date month year

hh—hourmm—minutess—secondmonth—monthdate—day

year—year

The default start time is Jun 1, 1993, which is also the earliest start
time available.
infinite

Indicates that the encryption key is valid for ever.

end-time

End time of the encryption key. It must be later than the start time.

duration seconds

Duration of the encryption key after the start time. The value ranges
from 1 to 2147483646.

Default

Command
mode

Usage

infinite

Encryption key configuration modeUse this command to specify the lifetime of an encryption key in its receiving direction.

guideline

ExamplesThe following example configures the lifetime of key 1.
Ruijie(config)#key chain kc
Ruijie(config-keychain)#key 1
Ruijie(config-keychain-key)#key-string Hello
Ruijie(config-keychain-key)#accept-lifetime 16:30:00 Oct 1 2010 duration 43200

4-1

Command Reference

Keys Commands(beta)

RelatedCommand

Descriptioncommand--Platform-

description

4.2 key
Use this command to define an encryption key and enter the encryption key chain configuration mode.
Use the no form of this command to delete it.
key key-id
no key key-id

Parameter

Parameter

Description

description

key-idKey ID, ranging from 0 to 2147483647.

Default

No encryption key is configured.

Command
mode

Usage

Encryption key chain configuration mode.

Use this command to define an encryption key.

guideline

ExamplesThe following example configures encryption key chain ripkeys and key 1.
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)# key 1

RelatedCommand

Descriptioncommand--Platform-

description

4.3 key chain
Use this command to define a key chain and enter the key chain configuration mode. Use the no formof this command to delete it.
key chain key-chain-nameno key chain key-chain-nameParameter

Parameter

Description

description

key-chain-nameKey chain name.

4-2

Command Reference

Default

Commandmode

Keys Commands(beta)

No key chain is configured.

Global configuration mode.

Usage

For a key chain to take effect, you need to configure at least one key.

guideline

ExamplesThe following example configures key chain ripkeys and enters the key chain configuration mode.
Ruijie(config)# key chain ripkeys

RelatedCommand

Descriptioncommand--Platform-

description

4.4 key-string
Use this command to specify a key string. Use the no form of this command to delete it.
key-string [0|7] text
no key-string

Parameter

Parameter

Description

description

0

Use plaintext.

7

Use encryption.

text

Authentication string.

Default

Command
mode

Usage

No key string is configured.

Encryption key configuration mode.

Use this command to specify a key string.

guideline

ExamplesThe following example configures key chain ripkeys, key 1 and the key string abc:
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)# key 1
Ruijie(config-keychain-key)#key-string abc

RelatedCommand

Descriptioncommand--Platform-

4-3

Command Reference

Keys Commands(beta)

description

4.5 send-lifetime
Use this command in the encryption key configuration mode to specify the lifetime of an encryption key
in its send direction. Use the no form of this command to restore the default value.
send-lifetime start-time {infinite | end-time | duration seconds}
no send-lifetime

Parameter

Parameter

Description

description

start-timeStart time of the lifetime.

infinite

Indicates that the encryption key is valid for ever.

end-time

End time of the encryption key. It must be later than the start time.

duration

Duration of the encryption key after the start time. The value ranges from 1 toseconds

2147483646.

Default

Command
mode

Usage

infinite

Encryption key configuration modeUse this command to specify the lifetime of an encryption key in its send direction.

guideline

ExamplesThe following example configures the lifetime from 0:00 on September 9, 2000 to 0:00 on October 12,
2011
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)# key 1
Ruijie(config-keychain-key)# send-lifetime 00:00:00 Sep 9 2000 00:00:00 Dec 12
2011

RelatedCommand

Descriptioncommand--Platform-

description

4.6 show key chain
Use this command to display the key chain configuration.
show key chain [key-chain-name]Parameter

Parameter

Description

description

key-chain-name(Optional) Display the configuration of the specified key chain.

4-4Command Reference

Keys Commands(beta)

Default

The configuration information of all key chains is displayed.

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode, routing protocol

mode

configuration mode, and key chain configuration mode.

Usage

If no key chain is specified, the configuration information of all key chains is displayed.

guideline

ExamplesRuijie# show key chainroute-map AAA, permit, sequence 10
Match clauses:
ip address 2
Set clauses:
metric 10
Ruijie(config)#show key chain
key chain kc
key 1 -- text "ruijie"
accept-lifetime (12:11:00 May

2 2001) - (infinite)send-lifetime (always valid) - (always valid) [valid now]

Description of fields in the command output is as follows:
Field

Description

key chain

Key chain name.

key

Key ID.

accept-lifetime

Lifetime in the accept direction.

send-lifetime

Lifetime in the send direction.

RelatedCommand

Descriptioncommand--Platform-

description

4-5

Command Reference

Routing Policies Commands(beta)

5 Routing Policies Commands(beta)

5.1 ip prefix-list
Use this command to create a prefix list or add an entry to the prefix list. Use the no form of thiscommand to remove the prefix list or an entry.
ip prefix-list prefix-list-name [ seq seq-number] { deny | permit } ip-prefix [geminimum-prefix-length][ le maximum-prefix- length]
no ip prefix-list prefix-list-name [ seq seq-number] { deny | permit } ip-prefix [geminimum-prefix-length][ le maximum-prefix- length]

Parameter

Description

prefix-list-name

Name of the prefix list
Sequence number of an entry in the range of 1 to2147483647. When you execute this command to add anentry without a sequence number, the system allocates a

seq-number

default sequence number for the entry. The default
sequence number of the first entry is 5. Everysubsequential entry without a sequence number uses thetime of 5 larger than the previous sequence number as thedefault sequence number.

Parameter
description

deny

Denies the route matching the prefix list.

permitPermits the route matching the prefix list.
Network address and mask. Network address can be any

ip-prefix

valid IP address and the mask length is in the range of 0 to
32.
(Optional) Minimum length of the prefix (the starting length)

minimum-prefix-length

Note: “ge” indicates the operation of “larger than” and“equivalent to”.
(Optional) Maximum length of the prefix (the ending length)

maximum-prefix-length

Note: “le” indicates the operation of “less than” and“equivalent to”.

Default
configurati

None

on

Commandmode

Global configuration mode.

Usage

The ip prefix-list command configures the prefix list, with the permit or deny keyword to determine theguidelines

action in case of matching.

5-1

Command Reference

Routing Policies Commands(beta)

You can execute this command to define an exact match, or use “ge” or “le” to define a range match fora prefix for flexible configuration. “ge” indicates the range of minimum-prefix-length to 32; “le” indicatesthe range of the mask length of the IP prefix to maximum-prefix-length; “ge” and “le” indicates the rangeof minimum-prefix-length to maximum-prefix-length, namely, mask length of IP prefix <minimum-prefix-length < maximum-prefix-length <=32.

The following example filters the static routes the RIP redistributes by the destination IP address
following the rule defined in the associated IP prefix list, for example, redistribute the routes whose
destination IP address is in the range 201.1.1.0/24.
Ruijie# configure terminal
ExamplesRuijie(config)# ip prefix-list pre1 permit 201.1.1.0/24
Ruijie(config)# router rip
Ruijie(config-router)# distribute-list prefix pre1 out static
Ruijie(config-router)# end

5.2 ip prefix-list description
Use this command to add the description of a prefix list. Use the no form of this command to delete thedescription.
ip prefix-list prefix-list-name description description-text

Parameter
description

Parameter

Description

prefix-list-name

Name of the prefix list

description-text

Description of the prefix list

Default
configuration

No description is added for a prefix list, by default.

Commandmode

Global configuration mode

The example below adds the description for the prefix list:
ExamplesRuijie# configure terminal
Ruijie(config)# ip prefix-list pre description Deny

5.3 ip prefix-list sequence-number
Use this command to enable sort function for a prefix list. Use the no form of this command to disable
the sort function.
ip prefix-list sequence-number

Parameter
description

Disabled

5-2

Command Reference

Routing Policies Commands(beta)

Default
configuration

No sequence number is added for a prefix list, by default.

Commandmode

Global configuration mode

The example below adds a sequence number for the prefix list:
ExamplesRuijie# configure terminal
Ruijie(config)# ip prefix-list pre description deny

RelatedCommand

Descriptioncommands

ip prefix-list

Configures the prefix list.

Platform
description

N/A

5.4 ipv6 prefix-list
Use this command to create an IPv6 prefix list or add an entry in the prefix list. Use the no form of thiscommand to delete an IPv6 prefix list or an entry in the prefix list.
Ipv6 prefix-list prefix-list-name[ seq seq-number] { deny | permit} ipv6-prefix [geminimum-prefix-length][ le maximum-prefix- length]
no ipv6 prefix-list prefix-list-name[ seq seq-number] { deny | permit} ipv6-prefix [ge minimum-prefixlength][ le maximum-prefix- length]
Parameter

Description

prefix-list-name

Name of the prefix list
Sequence number of an entry in the prefix list. Its range is 1 to4294967294. If the sequence number is not specified in thisseq-number

command, the system will allocate a default one for the entry. The
default sequence number of the first entry is 5, and that of eachsubsequent one is the product of adding 5 to the sequence number

Parameter
descriptionof the proceeding entry.
permitPermits the access to the matching result.

deny

Denies the access to the matching result.

ipv6-prefix

minimum-prefix-length

maximum-prefix- length

Network address and its mask. The network address can be any
valid IP address. The mask can be 0 to 32 characters.
(Optional) Minimum length of the prefix (the starting length)
Note: “ge” indicates the operation of “larger than” and “equivalent to”.
(Optional) Maximum length of the prefix (the ending length)
Note: “le” indicates the operation of “less than” and “equivalent to”.

5-3

Command Reference

Routing Policies Commands(beta)

Default
configuration

No prefix list is created.

Commandmode

Global configuration mode

The ipv6 prefix-list command configures the prefix list, with the permit or deny keyword to determine theaction in case of matching.
Usage
guideline

You can execute this command to define an exact match, or use “ge” or “le” to define a range match fora prefix for flexible configuration. “ge” indicates the range of minimum-prefix-length to 128; “le” indicatesthe range of the mask length of the IP prefix to maximum-prefix-length; “ge” and “le” indicates the rangeof minimum-prefix-length to maximum-prefix-length, namely, Ipv6-prefix mask length <minimum-prefix-length < maximum-prefix-length <= 128

The following example filters the static routes the RIP redistributes by the destination IP address
following the rule defined in the associated IP prefix list, for example, redistribute the routes whose
destination IP address is in the range 2222::/64.
Ruijie# configure terminal
ExamplesRuijie(config)# ipv6 prefix-list pre1 permit 2222::64/64
Ruijie(config)# ipv6 router rip
Ruijie(config-router)# distribute-list prefix pre out
Ruijie(config-router)# end

5.5 ipv6 prefix-list description
Use this command to add the description of an IPv6 prefix list. Use the no form of this command todelete the description.
ipv6 prefix-list prefix-lis-name description description-text
no ipv6 prefix-list prefix-lis-name description description-text

Parameter
description

Parameter

Description

prefix-lis-name

Name of the ipv6 prefix list

description-text

Description of the ipv6 prefix list

Default
configuration

No description is added for an IPv6 prefix list, by default.

Commandmode

Global configuration mode

The example below adds the description for the prefix list:
ExamplesRuijie# configure terminal
Ruijie(config)# ipv6 prefix-list pre description Deny

5-4

Command Reference

Routing Policies Commands(beta)

RelatedCommand

Descriptioncommands

ipv6 prefix-list

Configures the IPv6 prefix list.

5.6 ipv6 prefix-list sequence-number
Use this command to enable the sorting function for an IPv6 prefix list. Use the no form of thiscommand to remove the settings.
ipv6 prefix-list sequence-number
no ipv6 prefix-list sequence-number

Parameter
description

Disabled.

Default
configuration

No sequence number is added for a prefix list, by default.

Commandmode

Global configuration mode

The example below adds a sequence number for the prefix list:
ExamplesRuijie# configure terminal
Ruijie(config)# ipv6 prefix-list pre description Deny

RelatedCommand

Descriptioncommands

ipv6 prefix-list

Configures the IPv6 prefix list.

5.7 match interface
Use match interface command to redistribute the routes whose next hop is the specified interface.
Use the no form of this command to remove the setting.
match interface interface-type interface-number […interface-type interface-number]no match interface [interface-type interface-number […interface-type interface-number]]Parameter
description

Parameter

Description

interface-type

Interface typeinterface-number

Interface number

Default
configuration

None.

CommandRoute map configuration mode.

5-5Command Reference

Routing Policies Commands(beta)

modeThis command can be followed by multiple interfaces.
You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the static routes in the RIP routing domain. The mutual route redistribution can be
Usage
guidelines

implemented between all the IP routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The route map can be configured very flexibly for route redistribution and policy-based routing. No
matter how the route map is used, the configuration principle is the same, except that different
command sets are used. Even if it is used on the route redistribution, different routing protocols canuse different commands with the route map.
The following example redistributes the static route with the next hop of vlan 1 in the RIP routing
protocol.
ExamplesRuijie(config)#router rip
Ruijie(config-router)#redistribute static route-map redrip
Ruijie(config-router)#network 192.168.12.0 0.0.0.255
Ruijie(config-router)#
Ruijie(config-router)#route-map redrip permit 10
Ruijie(config-route-map)#match interface vlan 1

Command

Description

match ip address

Matches the address in the access list.

match ip next-hop

Matches the next-hop IP address in the access list.

Relatedmatch ip route-source

Matches the source IP address in the access list.

commands

match metric

Matches the metric.

match tag

Matches the tag.

set metricSets the metric.

set tag

Sets the tag.

5.8 match ip address
Use match ip address command to redistribute the routes matching the IP address permitted by the
ACL or the prefix list. Use the no form of this command to remove the setting.
match ip address {access-list-number [access-list-number | access-list-name] |access-list-name[access-list-number|access-list-name] | prefix-list prefix-list-name [prefix-list-name]}no match ip address [access-list-number [access-list-number | access-list-name] |access-list-name[access-list-number|access-list-name] | prefix-list prefix-list-name [prefix-list-name]]

5-6Command Reference

Routing Policies Commands(beta)

Parameter

Description

Parameteraccess-list-number

Number of the access list

description

access-list-name

Name of the access list

prefix-list prefix-list-nameSpecifies the prefix list to match.

Default
configuration

None.

Commandmode

Route map configuration mode.

Multiple access list numbers or names may follow match ip address.
You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the static routes in the RIP routing domain. The mutual route redistribution can be
Usage
guidelines

implemented between all the IP routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The route map can be configured very flexibly for route redistribution and policy-based routing. No
matter how the route map is used, the configuration principle is the same, except that different
command sets are used. Even if it is used on the route redistribution, different routing protocols canuse different commands with the route map.
The following example enables the RIP routing protocol to redistribute static routes that match accesslist 10 and the default metric being 40.
Ruijie(config)#router rip
ExamplesRuijie(config-router)#redistribute static route-map redrip
Ruijie(config-router)#network 192.168.12.0 0.0.0.255
Ruijie(config-router)#
Ruijie(config-router)#route-map redrip permit 10
Ruijie(config-route-map)#match ip address 10
Ruijie(config-route-map)#set metric 40
Ruijie(config-route-map)#

Relatedcommands

Command

Description

access-list

Sets the access list.

match interface

Matches the next-hop interface of the route.

match ip next-hop

Matches the next-hop address in the access list.

match ip route-source

Matches the route source address in the access list.

match metric

Matches the metric.

match tag

Matches the tag.

5-7Command Reference

Routing Policies Commands(beta)

set metricSets the metric.

set tag

Sets the tag.

5.9 match ip next-hop
Use match ip next-hop command to redistribute the routes whose next-hop IP address matches theaccess list or the prefix list. Use the no form of this command to remove the setting.
match ip next-hop {access-list-number [access-list-number | access-list-name] |access-list-name[access-list-number|access-list-name] | prefix-list prefix-list-name [prefix-list-name]}no match ip next-hop [access-list-number [access-list-number | access-list-name] |access-list-name[access-list-number|access-list-name] | prefix-list prefix-list-name [prefix-list-name]]

Parameter

Description

Parameteraccess-list-number

Number of the access list

description

access-list-name

Name of the access list

prefix-list prefix-list-nameSpecifies the prefix list to match.

Default
configuration

None.

Commandmode

Route map configuration mode.

Multiple access list numbers or names may follow match ip next-hop.
You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the static routes in the RIP routing domain. The mutual route redistribution can be
Usage
guidelines

implemented between all the IP routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the RIP routing protocol redistributes the static routes. As long as the next hop
address of the static route matches the access list 10 or 20, the RIP allows for redistribution.
Ruijie(config)# router rip
Ruijie(config-router)# redistribute static route-map redrip
Ruijie(config-router)# network 192.168.12.0 0.0.0.255
ExamplesRuijie(config-router)# exit
Ruijie(config)# access-list 10 permit host 192.168.10.1
Ruijie(config)# access-list 20 permit host 172.16.20.1
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match ip next-hop 10 20

5-8

Command Reference

Relatedcommands

Routing Policies Commands(beta)

Command

Description

access-list

Sets the access list.

match ip address

Matches the IP address in the access list.

match interface

Matches the next-hop interface of the route.

match ip route-source

Matches the route source address in the access list.

match metric

Matches the metric.

match tag

Matches the tag.

set metricSets the metric.

set tag

Sets the tag.

5.10 match ip route-source
Use match ip route-source command to redistribute the routes whose source IP address matches theaccess list. Use the no form of this command to remove the setting.
match ip route-source {access-list-number [access-list-number | access-list-name] |access-list-name[access-list-number|access-list-name] | prefix-list prefix-list-name [prefix-list-name]}no match ip route-source [access-list-number [access-list-number | access-list-name]|access-list-name [access-list-number|access-list-name] | prefix-list prefix-list-name [prefix-list-name]]

Parameter

Description

Parameteraccess-list-number

Number of the access list

description

access-list-name

Name of the access list

prefix-list prefix-list-nameSpecifies the prefix list to match.

Default
configuration

None.

Commandmode

Route map configuration mode.

Multiple access list numbers may follow match ip route-source.
You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the static routes in the RIP routing domain. The mutual route redistribution can be
Usage
guidelines

implemented between all the IP routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the RIP routing protocol redistributes the static routes. As long as the source IP
Examplesaddress of the static route matches the access list 5, the RIP allows for redistribution.
Ruijie(config)# access-list 5 permit 192.168.100.1 0.0.0.255

5-9Command Reference

Routing Policies Commands(beta)

Ruijie(config)#router rip
Ruijie(config-router)#redistribute static route-map redrip
Ruijie(config-router)#network 192.168.12.0 0.0.0.255
Ruijie(config-router)#
Ruijie(config-router)#route-map redrip permit 10
Ruijie(config-route-map)# match ip route-source 5
Ruijie(config-route-map)#

Relatedcommands

Command

Description

access-list

Sets the access list.

match ip address

Matches the IP address in the access list.

match interface

Matches the next-hop interface of the route.

match ip next-hop

Matches the next-hop IP address in the access list.

match metric

Matches the metric.

match tag

Matches the tag.

set metricSets the metric.

set tag

Sets the tag.

5.11 match ipv6 address
Use this command to redistribute the network routes permitted in the IPv6 access list or the IPv6 prefix
list. Use the no form of this command to delete the setting.
match ipv6 address { access-list-name] | prefix-list prefix-list-name }no match ipv6 address

Parameter
description

Parameter

Description

access-list-name

Name of the access list.

prefix-list prefix-list-nameSpecifies the IPv6 prefix list to match.

Default
configuration

None

Commandmode

Route map configuration mode

You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the static routes in the RIP routing domain. The mutual route
redistribution can be implemented between all the IP routing protocols.
Usage

In the route redistribution, route maps are usually used to control the mutual route redistribution

guideline

between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

5-10Command Reference

Routing Policies Commands(beta)

The route map can be configured very flexibly to be used for route redistribution and policy-based
routing. No matter how the route map is used, the configuration principle is the same, except thatdifferent command sets are used. Even if it is used on the route redistribution, different routing
protocols can use different commands with the route map.

The following example enables the RIP routing protocol to redistribute static routes that match accesslist v6acl, with the default metric being 30.
ExamplesRuijie(config)#ipv6 access-list v6acl
Ruijie(config-ipv6-acl)#10 permit ipv6 host 2620::64 any
Ruijie(config-ipv6-acl)#exit
Ruijie(config)#ipv6 router rip
Ruijie(config-router)#redistribute static route-map redrip
Ruijie(config-router)#route-map redrip permit 10
Ruijie(config-route-map)#match ipv6 address v6acl
Ruijie(config-route-map)#set metric 30

Command

Description

ipv6 access-list

Sets the IPv6 access list.

match interface

Matches the next-hop interface of the route.
Matches the next-hop address in the IPv6

match ipv6 next-hop

access list.

Relatedcommands

Matches the route source address in the IPv6

match ipvr route-source

access list.

match metric

Matches the route metric.

match tag

Matches the route tag.

set metricSets the metric for route redistribution.

set tag

Sets the tag for route redistribution.

5.12 match ipv6 next-hop
Use this command to redistribute the network routes whose next-hop IP address matches the IPv6
access list or the IPv6 prefix list. Use the no form of this command to delete the setting.
match ipv6 next-hop { access-list-name] | prefix-list prefix-list-name}no match ipv6 next hop

Parameter
description

Parameter

Description

access-list-name

Name of the IPv6 access list.

prefix-list prefix-list-nameSpecifies the IPv6 prefix list to match.

Default
configuration

None

5-11

Command Reference

Routing Policies Commands(beta)

Commandmode

Route map configuration mode

You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the static routes in the RIP routing domain. The mutual route redistribution can be
implemented between all the IP routing protocols.
Usage

For route redistribution, route maps are usually used to control the mutual route redistribution

guideline

between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The route map can be configured very flexibly to be used for route redistribution and policy-based
routing. No matter how the route map is used, the configuration principle is the same, except thatdifferent command sets are used. Even if it is used on the route redistribution, different routing
protocols can use different commands with the route map.

The following example enables the RIP routing protocol to redistribute static routes that only match
access list v6acl, with the default metric being 40.
ExamplesRuijie(config)#ipv6 access-list v6acl
Ruijie(config-ipv6-acl)#10 permit ipv6 host 2620::64 any
Ruijie(config-ipv6-acl)#exit
Ruijie(config)#ipv6 router rip
Ruijie(config-router)#redistribute static route-map redrip
Ruijie(config-router)#route-map redrip permit 10
Ruijie(config-route-map)#match ipv6 address v6acl
Ruijie(config-route-map)#set metric 40

Relatedcommands

Command

Description

ipv6 access-list

Sets the IPv6 access list.

match interface

Matches the next-hop interface of the route.

match ipv6 address

Matches the IP address in the IPv6 access list.

match ipv6 route-source

Matches the route source address in the IPv6 accesslist.

match metric

Matches the route metric.

match tag

Matches the route tag.

set metricSets the metric for route redistribution.

set tag

Sets the tag for route redistribution.

5.13 match ipv6 route-source
Use this command to redistribute the network routes whose next-hop IP address matches the IPv6
access list or the IPv6 prefix list. Use the no form of this command to delete the setting.

5-12Command Reference

Routing Policies Commands(beta)

match ipv6 route-source { access-list-name] | prefix-list prefix-list-name }no match ipv6 route-source

Parameter
description

Parameter

Description

access-list-name

Name of the IPv6 access list.

prefix-list prefix-list-nameSpecifies the IPv6 prefix list to match.

Default
configuration

None

Commandmode

Route map configuration mode

You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the static routes in the RIP routing domain. The mutual route
redistribution can be implemented between all the IP routing protocols.
Usage

In the route redistribution, route maps are usually used to control the mutual route redistribution

guideline

between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The route map can be configured very flexibly to be used for route redistribution and policy-based
routing. No matter how the route map is used, the configuration principle is the same, except thatdifferent command sets are used. Even if it is used on the route redistribution, different routing
protocols can use different commands with the route map.
The following example enables the RIP routing protocol to redistribute static routes that only match
access list v6acl, with the default metric being 50.

ExamplesRuijie(config)#ipv6 access-list v6acl
Ruijie(config-ipv6-acl)#10 permit ipv6 host 5200::64 any
Ruijie(config-ipv6-acl)#exit
Ruijie(config)#ipv6 router rip
Ruijie(config-router)#redistribute static route-map redrip
Ruijie(config-router)#route-map redrip permit 10
Ruijie(config-route-map)#match ipv6 address v6acl
Ruijie(config-route-map)#set metric 50

Command

Description

Relatedipv6 access-list

Sets the IPv6 access list.

commands

match interface

Matches the next-hop interface of the route.

match ipv6 address

Matches the IP address in the IPv6 access list.

5-13

Command Reference

Routing Policies Commands(beta)

match ipv6 next-hop

Matches the next hop in the IPv6 access list.

match metric

Matches the route metric.

match tag

Matches the route tag.

set metricSets the metric for route redistribution.

set tag

Sets the tag for route redistribution.

5.14 match metric
Use match metric command to redistribute the routes of the specified metric. Use the no form of thiscommand to remove the setting.
match metric metricno match metric metricParameter

Parameter

Description

description

metricRoute metric, in the range of 0 to 4294967295

Default
configuration

None.

Commandmode

Route map configuration mode.

You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the static routes in the RIP routing domain. The mutual route
redistribution can be implemented between all the IP routing protocols.
Usage

In the route redistribution, route maps are usually used to control the mutual route redistribution

guidelines

between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the RIP routing protocol redistributes the static routes of metric 10.
Ruijie(config)#router rip
Ruijie(config-router)#redistribute static route-map redrip
ExamplesRuijie(config-router)#network 192.168.12.0 0.0.0.255
Ruijie(config-route-map)#match metric 10
Ruijie(config-route-map)#

Command

Description

Relatedaccess-list

Sets the access list.

commands

match ip address

Matches the IP address.

match interface

Matches the interface.

5-14

Command Reference

Routing Policies Commands(beta)

match ip next-hop

Matches the next-hop IP address.

match ip route-source

Matches the source IP address.

match tag

Matches the tag.

set metricSets the metric.

set tag

Sets the tag.

5.15 match tag
Use this command to redistribute the network routes with the specified tag. Use the no form of thiscommand to delete the setting.
match tag tag […tag]no match tag [tag […tag]]Parameter

Parameter

Description

description

tag

Route tag

Default
configuration

None

Commandmode

Route map configuration mode

Multiple tags may follow the match tag command.
You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the static routes in the RIP routing domain. The mutual route
Usage
guideline

redistribution can be implemented between all the IP routing protocols.
In the route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the RIP routing protocol redistributes only the static routes with tag 50 and 80.
Ruijie(config)# router rip
Ruijie(config-router)# redistribute static route-map redrip
ExamplesRuijie(config-router)# network 192.168.12.0
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match tag 50 80

RelatedCommand

Descriptioncommands

access-list

Sets the access list.

5-15

Command Reference

Routing Policies Commands(beta)

match ip address

Matches the IP address.

match interface

Matches the next-hop IP interface.

match ip route-source

Matches the source IP address.

match metric

Matches the metric.

match ip next-hop

Matches the next-hop IP address.

set metricSets the metric.

set tag

Sets the tag.

5.16 memory-lack exit-policy
Use this command to configure a policy to preferentially exit a routing protocol when the memory
reaches the lower limit. Use the no form of this command to restore the default policy, namely, exit therouting protocol which occupies the largest memory.
memory-lack exit-policy { pim-sm | rip }no memory-lack exit-policy

Parameter
description

Default

Commandmode

Parameter

Description

pim-smPreferentially exits PIM-SM if the memory is insufficient.

rip

Preferentially exits RIP if the memory is insufficient.

By default, the routing protocol which occupies the largest memory exits preferentially.

Global configuration mode

Usage

When the memory reaches the lower limit, you can disable a routing protocol to release the memory to

guideline

ensure the normal running of other protocols.
When the system runs out of memory, disable a routing protocol which has the minimal impact on thesystem to ensure the operation of main services.
Configuring the policy to preferentially exit the routing protocols which are disabled cannot help thesystem release memory.
This command ensures the operation of main services to some extent when the memory is insufficient.
If the memory is further consumed, all routing protocols will exit and stop running.

ExamplesRuijie(config)#memory-lack exit-policy rip

RelatedCommand

Descriptioncommand--Platform-

description

5-16

Command Reference

Routing Policies Commands(beta)

5.17 route-map
Use route-map to enter the route map configuration mode and define a route map. Use the no form of
this command to remove the setting.
route-map route-map-name [permit | deny] [sequence-number]no route-map route-map-name [{permit | deny}sequence-number]

Parameter

Description
Name of the route map. The redistribute command references theroute-map-nameroute map according to its name. Multiple routing policies can be
defined in a route map, and each policy corresponds to one sequencenumber.
(Optional) If the permit keyword is defined and the rule defined bymatch is met, The set command controls the redistributed routes. For
policy-based routing, the set command controls the packet forwarding,permitand exits the route map operation.
If the permit keyword is defined but the rule defined by match is not

Parametermet, the system performs the routing policy of the second route map till

description

the set command is executed finally.
(Optional) If the deny keyword is defined and the rule defined by matchis met, no operation will be performed. Neither route redistribution nor
policy-based routing is supported in the route map. The system exits
deny

the route map operation.
If the deny keyword is defined but the rule defined by match is not met,
the system performs the routing policy of the second route map till theset command is executed finally.

sequence-number

Sequence number of the route map. The policy with a lower sequencenumber is preferred, so it’s noted when setting the sequence number.

Default
configuration

None.

Commandmode

Global configuration mode.

At present, the RGOS software primarily uses the route map for route redistribution and policy-based
routing.
1. Route redistribution control
Usage
guidelines

You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the static routes in the RIP routing domain. The mutual route redistribution can be
implemented between all the IP routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match

5-17

Command Reference

Routing Policies Commands(beta)

command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.
When configuring route maps, pay attention to the following when using the sequence number of aroute map:
When you create the first route map policy, if sequence-number is not specified, it is 10 by default;
If only one route map policy exists and sequence-number is not specified, no new route map policy
will be created, and the existing route map policy will be accessed for configuration;
If more than one route map policy is available, the sequence number of each policy shall be specified;otherwise an error message will be displayed.
2. policy-based routing
Policy-based routing refers to a routing mechanism based on user defined policies. Compared withtraditional destination IP address-based routing, policy-based routing offers a flexibility for routing
based on source IP address, length and port of IP packets. Policy-based routing can apply to the IP
packets received on an interface or the IP packets sent from the local device.

Policy-based routing utilizes route map to define routing and forwarding policy. The match command
defines packet filtering rule and the set command defines the action for the packets matching thefiltering rules. The match command used includes match ip address; the set command includes set ip[default] nexthop.

The following example enables the RIP routing protocol to redistribute the static routes with the hopcount of 4. In the RIP route domain, the default metric is 40 and the tag is 40.
Ruijie(config)#router rip
Ruijie(config-router)# redistribute static route-map redrip
ExamplesRuijie(config-router)# network 192.168.12.0 0.0.0.255
Ruijie(config-router)#route-map redrip permit 10
Ruijie(config-route-map)# match metric 4
Ruijie(config-route-map)# set metric 40
Ruijie(config-route-map)# set tag 40

RelatedCommand

Descriptioncommands

redistribute

Redistribute the routes.

5.18 set ip default next-hop
Use this command to specify the default next-hop IP address for the packets that match the rule in theroute map configuration mode. Use the no form of this command to remove the setting.
set ip default next-hop ip-address [ weight ] [ …ip-address [ weight ] ]no set ip default next-hop [ ip-address [ weight ] [ …ip-address [ weight ] ] ]Parameter
description

Parameter

Description

ip-address

IP address of the next hop.

weightWeight of the next hop.

5-18Command Reference

Routing Policies Commands(beta)

Default
configuration

None

Commandmode

Route map configuration modeThis command supports two operation modes: WCMP load balancing mode and non-WCMP loadbalancing mode. In the former mode, the system implements WCMP load balancing according to theweight inputted.
Up to 32 IP addresses may follow the set ip default next-hop command.
If a weight follows ip address, up to 4 next hop IP addresses can be configured.
Note: If a weight follows any next-hop, the operation mode of this command will be automaticallyswitched to the WCMP load balancing mode. In this mode, the weight of those next hop IP addresses
whose weight is not configured is 1 by default.
Differences between set ip next-hop and set ip default next-hop: After the set ip next-hop command is
Usage
guideline

configured, the policy-based routing takes precedence over the routing table; while after the set ip
default next-hop command is configured, the routing table takes precedence over the policy-based
routing.
Use this command to customize a default route for a specified user. If the software fails to find theforwarding route, the packet will be forwarded to the nexthop set with this command.
To use the policy-based routing, you must specify the route map for it and create the route map. A
route map contains multiple policies, and each policy defines one or more match rules and thecorresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded through the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.
A route-map policy may contain multiple set operations.

The following example forwards the packets from two different nodes through different routes.
For the messages received on the synchronous interface 1 from 1.1.1.1, if the software cannot findthe forwarding route, they are forwarded to device 6.6.6.6. For the messages received from 2.2.2.2, if
the software cannot find the forwarding route, they are forwarded to device 7.7.7.7. The othermessages will be discarded if the software cannot find the forwarding route.
Ruijie(config)#access-list 1 permit 1.1.1.1 0.0.0.0
Ruijie(config)#access-list 2 permit 2.2.2.2 0.0.0.0
ExamplesRuijie(config)#route-map equal-access permit 10
Ruijie(config- route-map)#match ip address 1
Ruijie(config-route-map)#set ip default next-hop 6.6.6.6
Ruijie(config)#route-map equal-access permit 20
Ruijie(config-route-map)#match ip address 2
Ruijie(config-route-map)#set ip default next-hop 7.7.7.7
Ruijie(config)#route-map equal-access permit 30

5-19

Command Reference

Routing Policies Commands(beta)

Command

Description

Relatedroute-map

Defines a route map.

commands

match ip address

Matches the IP address.

set ip next-hop

Sets the next hop of the packets.

Platform
description

N/A

5.19 set ip next-hop
Use this command to specify the next-hop IP address for the packets that meet the matching rule.
Use the no form of this command to remove the setting. This command is only used to configure
policy-based routing.
set ip next-hop ip-address [ weight ] [ …ip-address [ weight ] ]no set ip

Parameter
description

next-hop [ ip-address [ weight ] [ …ip-address [ weight ] ] ]Parameter

Description

ip-address

Next-hop IP address.

weightWeight of this next hop.

Default
configuration

None

Commandmode

Route map configuration modeThis command supports two operation modes: WCMP load balancing mode and non-WCMP loadbalancing mode. In the former mode, the system implements WCMP load balancing according to theweight entered by the user.
Multiple IP addresses may follow set ip next-hop and the number of addresses should be less than 32.

If weight follows any next-hop, the operation mode of this command will be
automatically switched to the WCMP load balancing mode. In the WCMP load
Usagebalancing mode, for the nexthop address without configuring the corresponding

guideline

weight, the weight is 1 by default.
If weight follows ip address, up to 4 next hop addresses can be configured.
This command can be used to set different routes for the traffic that meets different match rule. If
multiple IP addresses are configured, they can be used in turn.
Policy-based routing is a packet forwarding mechanism more flexible than the routing based on thetarget network. After the policy-based routing is used, the device will decide how to process the packets
that need be routed according to the route map, which decides the next-hop device of the packets.
To use the policy-based routing, you must specify the route map for it and create the route map. A route

5-20

Command Reference

Routing Policies Commands(beta)

map contains multiple policies, and each policy defines one or more match rules and the corresponding
operations. After policy-based routing is applied to an interface, the packets received by the interface will
be checked. The packets that do not match any policy in the route map will be forwarded to the usualroute. The packets that match a policy in the route map will be processed according to the operation
defined in the policy.
A route-map policy may contain multiple set operations.

When the interface receives the packets from 10.0.0.0/8, they will be sent to 192.168.100.1; when theinterface receives the packets from 172.16.0.0/16, they will be sent to 172.16.100.1; all other packets
will be discarded.
Ruijie(config)#access-list 10 permit 10.0.0.0 0.255.255.255
Ruijie(config)#access-list 20 permit 172.16.0.0 0.0.255.255
ExamplesRuijie(config)#route-map load-balance permit 10
Ruijie(config-route-map)#match ip address 10
Ruijie(config-route-map)#set ip next-hop 192.168.100.1
Ruijie(config)#route-map load-balance permit 20
Ruijie(config-route-map)#match ip address 20
Ruijie(config-route-map)#set ip next-hop 172.16.100.1

Command

Description

Relatedroute-map

Defines the route map.

commands

match ip address

Matches the IP address.

set ip default next-hop

Sets the default next hop.

5.20 set ipv6 default next-hop
Use this command to specify the default next-hop IPv6 address for the IPv6 packets that match the rulein the route map configuration mode. Use the no form of this command to remove the setting. This
command is only used to configure policy-based routing.
set ipv6 default next-hop global-ipv6-address [ weight ] [ global-ipv6-address [ weight ]]no set ipv6 default next-hop global-ipv6-address [ weight ] [ global-ipv6-address [ weight ] ]Parameter

Description

global-ipv6-address

Next-hop IPv6 address for packet forwarding. The next-hop
router must be a neighbor router.

Parameter
description

weightWeight in the load balancing mode, ranging from 1 to 8. A
larger value means larger packet traffic to be shared by thenext hop.

Default
configuration

None

CommandRoute map configuration mode

5-21

Command Reference

Routing Policies Commands(beta)

modeWith the policy-based routing applied to the interface, for the IPv6 packets matching thecorresponding rules, if the usual route (that is the non default route) with the destination of this packet
is not in the routing table, this packet will be forwarded to the next hop specified by the set ipv6 default
next-hop command. Otherwise it is forwarded through the usual route. Noted that the match ruleshould be the IPv6 corresponded.
Packets select the egress from the policy-based routing and routing table in following priority.
set ipv6 next-hop;
usual route (the non default route)Usage

set ipv6 default next-hop

guideline

default route.

For the switches, this function does not take effect if the mask length is beyond
64.
If this command and the set ipv6 next-hop verify-availability are bothconfigured ,the next hop set by the set ipv6 next-hop verify-availability
command will take effect preferentially.

ExamplesRelatedcommands

Command

Description

match ipv6 address

Sets the matching rule of policy-based routing.

set ipv6 next-hop

Sets the next hop of the policy-based routing.

Platform
description

N/A

5.21 set ipv6 next-hop
Use this command to specify the next-hop IPv6 address for the packets that meet the matching rule.
Use the no form of this command to remove the setting. This command is only used to configure
policy-based routing.

Parameter
description

set ipv6 next-hop

global-ipv6-address [weight] […global-ipv6-address [weight]]

no set ip next-hop

global-ipv6-address [weight] […global-ipv6-address [weight]]

Parameter

Description

global-ipv6-address

IPv6 address of the next hop. The next hop router should be theneighbor router.

weightWeight of the next hop in the load balancing mode, in the range of
1to 8.

5-22

Command Reference

Routing Policies Commands(beta)

Default
configuration

None

Commandmode

Route map configuration modeThis command supports two operation modes: WCMP load balancing mode and non-WCMP loadbalancing mode. In the former mode, the system implements WCMP load balancing according to theweight entered by the user.
Multiple IP addresses may follow set ip next-hop and the number of addresses should be less than32.
If weight follows ip address, up to 4 next hop addresses can be configured.
If weight follows any next-hop, the operation mode of this command will be
Usage

automatically switched to the WCMP load balancing mode. In the WCMP

guideline

load balancing mode, for the nexthop address without configuring thecorresponding weight, the weight is 1 by default.
When the packets select the egress from the policy-based routing and routing table, the priorities areas bellows.
set ipv6 next-hop;
usual route (the non default route)set ipv6 default next-hop
Default route.

Relatedcommands

Command

Description

match ipv6 address

Sets the matching rule of policy-based routing.

set ipv6 next-hop

Sets the next hop of the policy-based routing.

Platform
N/A

description

5.22 set metric
Use set metric to set the metric for the routes to be redistributed. Use the no form of this command to
remove the setting.
set metric[+ metric-value | - metric-value | metric-value]

no set metricParameter

Description

Parameter+

Increases based on the metric of the original routedescription-

Decreases based on the metric of the original route

metric-value

Metric for the route to be redistributed

5-23

Command Reference

Routing Policies Commands(beta)

Default
configuration

The default metric for route redistribution varies with the routing protocol.

Commandmode

Route map configuration mode

You should set the metric according to the actual network topology, because the routing depends onthe metric of routes. Attentions should be paid to the upper and lower limits of the routing protocols
when you execute the set metric, + metric or – metric commands. When the RIP protocol redistributes
the routes of other protocols, the range of the metric after increase or decrease is 1 to 16.
You can redistribute the routes from one routing process to another routing process. For example,
Usage

you can redistribute the static routes in the RIP routing domain. The mutual route redistribution can be

guideline

implemented between all the IP routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The following example enables the RIP routing protocol to redistribute the static routes and sets thedefault metric to 40.
Ruijie(config)# router rip
Ruijie(config-router)# redistribute static route-map redrip
ExamplesRuijie(config-router)# network 192.168.12.0 0.0.0.255
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# set metric 40

Command

Description

match interface

Matches the interface.

match ip address

Matches the IP address.

Relatedmatch ip next-hop

Matches the next-hop IP address.

commands

match ip route-source

Matches the source IP address.

match metric

Matches the metric.

match tag

Matches the tag.

set tag

Sets the tag.

5.23 set next-hop
Use this command to specify the next-hop IP address for the routes that match the rule. Use the noform of this command to remove the setting. This command is only used to configure routing policies.
set next-hop ip-addressno set next-hop

5-24Command Reference

Routing Policies Commands(beta)

Parameter

Parameter

Description

description

ip-address

IP address of the next hop.

Default
configuration

None

Commandmode

Route map configuration mode

You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the static routes in the RIP routing domain. The mutual route
redistribution can be implemented between all the IP routing protocols.
Usage

In the route redistribution, route maps are usually used to control the mutual route redistribution

guideline

between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The following example enables the RIP routing protocol to redistribute the static route and sets thenext-hop to 192.168.1.2.
ExamplesRuijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match ip address 1
Ruijie(config-route-map)# set next-hop 192.168.1.2

Command

Description

match interface

Matches the interface.

match ip address

Matches the IP address.

Relatedmatch ip next-hop

Matches the next-hop IP address.

commands

match ip route-source

Matches the source IP address.

match metric

Matches the metric.

match tag

Matches the tag.

set tag

Sets the tag.

5.24 set tag
Use this command to set the tag for the routes to be redistributed. Use the no form of this command to
remove the setting.
set tag tag
no set tag

Parameter

Parameter

Description

5-25

Command Reference

description

tagRouting Policies Commands(beta)

Tag of the route to be redistributed

Default
configuration

The original routing tag remains unchanged.

Commandmode

Route map configuration mode

Usage

This command can only be used for route redistribution. If this command is not configured, the default

guideline

route tag is used.

The following example enables the RIP routing protocol to redistribute the static route and sets the tag
as 100.
Ruijie(config)# router rip
Ruijie(config-router)# redistribute static route-map redrip
ExamplesRuijie(config-router)# network 192.168.12.0 0.0.0.255
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# set tag 100

Command

Description

match interface

Matches the interface.

match ip address

Matches the IP address.

Relatedmatch ip next-hop

Matches the next-hop IP address.

commands

match ip route-source

Matches the source IP address.

match metric

Matches the metric.

match tag

Matches the tag.

set metricSets the metric.

5.25 show ip prefix-list
Use show ip prefix-list to display the prefix list or the entries.
show ip prefix-list [prefix-name]Parameter

Parameter

Description

description

prefix-name

Name of the prefix list.

Default
configuration

The configuration information of all the prefix lists is displayed by default.

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode, routing protocol

mode

configuration mode, route map configuration mode.

5-26

Command Reference

Routing Policies Commands(beta)

Usage

If no prefix list is specified, the configurations of all the prefix lists are displayed, otherwise only theguidelines

configuration of the specified prefix list is displayed.

Ruijie# show ip prefix-list
seq pre: 2 entries
Examplesseq 5 permit 192.168.564.0/24
seq 10 permit 192.2.2.0/24

5.26 show ip protocols
Use this command to display information about the status of the currently running IPv4 routing
protocol.
show ip protocols [ rip ]Parameter
Description

Parameter

Description

rip

Displays information about the status of the RIP protocol.

-

Displays information about the status of all running routing protocols.

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode, routing protocol

Modeconfiguration mode, and routing map configuration mode

Default Level

14

Usage Guide

Information about the status of only the currently running routing protocol is displayed, and theinformation about a routing protocol that is not running is not displayed.

ExamplesRuijie(config)#show ip protocols
Routing Protocol is "rip"Sending updates every 30 seconds
Invalid after 180 seconds, flushed after 120 seconds
Outgoing update filter list for all interface is: not set
Incoming update filter list for all interface is: not set
Redistribution default metric is 1
Redistributing: static
Default version control: send version 1, receive any version
Routing for Networks:
192.168.12.0 255.255.255.0
Distance: 120 (default is 120)
Graceful-restart enabled
Restart grace period 60 secs

5-27

Command Reference

Routing Policies Commands(beta)

5.27 show ipv6 prefix-list
Use this command to display the information about the IPv6 prefix list or its entries.
show ipv6 prefix-list [prefix-name]Parameter

Parameter

Description

description

prefix-name

Name of the IPv6 prefix list.

Default
configuration

The configuration information of all the IPv6 prefix lists is displayed.

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode, route protocol

mode

configuration mode, route map configuration mode

Usage

If no prefix list is specified, the configurations of all the prefix lists are displayed, otherwise only theguideline

configuration of the specified prefix list is displayed.

Ruijie# show ipv6 prefix-list
ipv6 prefix-list p6: 2 entries
Examplesseq 5 permit 13::/20
seq 10 permit 14::/20

5.28 show route-map
Use the command to display the configuration of the route map.
show route-map [route-map-name]Parameter

Parameter

Description

description

route-map-name(Optional) Name of the specified the route map.

Default
configuration

The configuration information of all the route maps is displayed.

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode, routing protocol

mode

configuration mode, route map configuration mode.

Usage

If no route map is specified, the configurations of all the route maps will be displayed, otherwise only

guidelines

the configuration of the specified route map is displayed.

Ruijie# show route-map
route-map AAA, permit, sequence 10

ExamplesMatch clauses:
ip address 2

5-28

Command Reference

Routing Policies Commands(beta)

Set clauses:
metric 10

Field

Description

route-map

Name of the route map.

Permit

The route map contains the permit keyword.

sequence 10

Sequence number of the route map.

Match clauses
Set clauses

Set the matching rule. Whether to perform the set operation depends on thepermit or deny keyword in the route map.
Set the operation when the rule is matched.

5-29

Multicast Commands
1. IPv4 Multicast Routing Commands(beta)
2. IGMP Snooping Commands

Command Reference

IPv4 Multicast Routing Commands(beta)

1 IPv4 Multicast Routing Commands(beta)
1.1 msf ipmc-overflow override
Use this command to enable the overflow overriding mechanism. Use the no or default
form of this command to disable the overflow overriding mechanism.
msf ipmc-overflow override
no msf ipmc-overflow overridedefault msf ipmc-overflow override

Parameter

Parameter

Description

Description--

Default

Disabled.

Command Mode

Global configuration mode.

Usage Guide

N/A

Configuration

The following example enables the overflow overriding mechanism.

ExamplesRuijie(config)# msf ipmc-overflow override

1.2 msf nsf
Use this command to configure the parameter for the continuous multicast forwarding. Use
the no or default form of this command to restore the default setting.
msf nsf { convergence-time time | leak interval }no msf nsf { convergence-time | leak }default msf nsf { convergence-time | leak }Parameter
Parameter
Description

convergence-time timeleak interval

Default

Description
Maximum time for the multicast protocol convergence, inthe valid range of the 0-3600s.
Packet multicast leak time, in the valid range of 0-3600s

convergence-time time :140s;
leak interval: 150s

1-1

Command Reference

IPv4 Multicast Routing Commands(beta)

Command Mode

Global configuration mode.

Usage Guide

N/A

The following example sets the maximum time for the protocol convergence.
Ruijie(config)# msf nsf convergence-time 300
ExamplesThe following example sets the packets leak time:
Ruijie(config)# msf nsf leak 200

1.3 show msf msc
Use this command to show IPv4 multi-layer multicast forwarding table.
show msf msc [ soure-address ] [ group-address ] [ vlan-id ]Parameter
Description

Parameter

Description

source-address

Specified source IP address of the multi-layer multicast forwarding table.

group-address

Specified group address of the multi-layer multicast forwarding table.

vlan-id

The Vlan id where the incoming interface of the multi-layer multicast
forwarding table is. 4096 indicates a routed port.

Default

CommandMode

Privileged EXEC mode/Global configuration mode/Interface EXEC mode

The three parameters in this command are optional.
If no source address and group address are specified, all mfc entries are displayed.


If only the source address is specified as s1, all msc entries with source address 1 aredisplayed.

Usage Guide

If the source address is specified as s1 and the group address as g1, all corresponding
msc entries are displayed.



If the source address is specified as s1, the group address as g1 and the vlan id as v1, allcorresponding msc entries are displayed.

Each parameter shall be input in order. Only when the parameter in front has been
configured, the following one could be set.

The following example shows the IPv4 layer-3 multicast forwarding entries with source IP
Examplesaddress 192.168.195.25.
Ruijie# show msf msc 192.168.195.25
Multicast Switching Cache Table

1-2

Command Reference

IPv4 Multicast Routing Commands(beta)(192.168.195.23, 233.3.3.3, 1), SYNC, MTU:0, 1 OIFs
VLAN 1(0): 1 OPORTs, REQ: DONEOPORT 6, IGMP-SNP, REQ: DONE
The fields in the execution of the show mrf mfc command are described in the following table.

Field

Description

192.168.195.23

Source address of the entry.

233.3.3.3

Group address of the entry.

1

Vlan id where the incoming interface of the entry is.

SYNC

The entry has been synchronized to the hardware.

MTU

MTU value

OIFs

Layer-3 outgoing interface number.

VLAN1(0)The vlan where the layer-3 outgoing interface oif is.

1 OPORTs

The number of layer-2 port in the layer-3 outgoing oif.

REQ: DONE

This oif configuration on the hardware has done.

OPORT 6The layer-2 port in the oif with index 6.
This port is created by the IGMP SNOOPING protocol. This

IGMP-SNP

value can also be the PIM-SNP, which means this port iscreated by the PIM SNOOPING protocol. And the ROUTER
means this port is created by the layer-3 protocol.

REQ: DONE

The port configuration on the hardware has done.

1.4 show msf nsf
Use this command to show the configuration of continuous multicast forwarding.
show msf nsf

Parameter

Parameter

Description

Description--

Command Mode

Privileged EXEC mode/Global configuration mode/Interface EXEC mode

The following example shows the configuration of continuous multicast forwarding.
Ruijie# show msf nsf
Multicast HA Parameters
Examples---------------------------------------------------+------+
protocol convergence timeout 120 secs
flow leak interval 20 secs

Related Commands

Command

Description

msf nsf

Configure the multicast NSF parameter.

1-3Command Reference

IGMP Snooping Commands

2 IGMP Snooping Commands
2.1 clear ip igmp snooping gda-table
Use this command to clear the Group Destination Address (GDA) table.
clear ip igmp snooping gda-table

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

N/A

Privileged EXEC mode

The IGMP Snooping GDA table contains VLAN IDs (VIDs), group addresses, routing interface (static ordynamic) ID, and member interface ID. Among them, the VID and group address identify a forwarding
entry; the static routing interfaces will not age and cannot be deleted by using the clear ip igmp
snooping gda-table command.

Configuration

The following example clears the Group Destination Address (GDA) table.

ExamplesRuijie# clear ip igmp snooping gda-table

Platform

N/A

Description

2.2 clear ip igmp snooping statistics
Use this command to clear IGMP Snooping statistics.
clear ip igmp snooping statistics

Parameter
Description

Defaults

CommandMode

Parameter

Description

N/A

N/A

N/A

Privileged EXEC mode

2-1

Command Reference

Usage Guide

IGMP Snooping Commands

This command is used to clear the IGMP Snooping statistics, which can be displayed by using the show
ip igmp snooping statistics command.

Configuration

The following example clears the IGMP Snooping statistics.

ExamplesRuijie# clear ip igmp snooping statistics

Platform

N/A

Description

2.3 denyUse this command to deny the forwarding of the multicast streams in the range specified by the profile.
denyParameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

The forwarding of the multicast streams in the range specified by the profile is denied.

Profile configuration modeFirst, configure the multicast range using the range command in the profile configuration mode. In
addition, the profile must be applied to the interface in order to make the profile configuration take effect.

Configuration

The following is an example of deny the forwarding of the multicast stream 224.2.2.2 to 224.2.2.244.

ExamplesRuijie(config)# ip igmp profile 1
Ruijie(config-profile)# range 224.2.2.2 224.2.2.244
Ruijie(config-profile)# deny

Platform

N/A

Description

2.4 ip igmp profile
Use this command to create a profile and enter the IGMP profile configuration mode.
Use the no or default form of this command to restore the default setting.
ip igmp profile profile-number
no ip igmp profile profile-number
default ip igmp profile profile-number

Parameter

Parameter

Description

2-2

Command Reference

IGMP Snooping Commands

Description
profile-number

Defaults

CommandMode

Usage Guide

Profile number, in the range from 1 to 1024

No profile is created by default.

Global configuration mode

The profile is a filter to permit/deny specified groups in the following steps:Use the ip igmp profile command to create a profile and enter profile configuration mode.

Use the range command to define a profile range.

Use the permit command to permit this profile in the filtering, or use the deny command to denythis profile in the filtering.



If the deny command is used without any profile specified, all profiles in the profile are permitted.



If the permit command is used without any profile specified, all profiles in the profile are denied.

Configuration

The following example creates and permits profile 1 with addresses from 224.2.2.2 to 224.2.2.244.

ExamplesRuijie(config)# ip igmp profile 1
Ruijie(config-profile)# range 224.2.2.2 224.2.2.244
Ruijie(config-profile)# permit

Platform

N/A

Description

2.5 ip igmp snooping
Use this command to enable IGMP snooping and enter the IVGL mode.
ip igmp snooping ivgl
Use this command to enable IGMP snooping and enter the SVGL mode.
ip igmp snooping svgl
Use this command to enable IGMP snooping and enter the IVGL-SVGL mode.
ip igmp snooping ivgl-svgl
Use the no or default command to restore the default setting.
no ip igmp snooping
no ip igmp snooping ivgl
no ip igmp snooping svgl
no ip igmp snooping ivgl-svgl
default ip igmp snooping
default ip igmp snooping ivgl
default ip igmp snooping svgl
default ip igmp snooping ivgl-svgl
Parameter
Description

Parameter

Description

2-3

Command Reference

IGMP Snooping Commands

N/A

Defaults

CommandMode

Usage Guide

N/A

IGMP Snooping is disabled by default.

Global configuration mode

IVGL (Independent VLAN Group Learning): In this mode, the multicast flows in different VLANs
are independent. A host can only request multicast flows to the router interface in the same VLAN.
Upon receiving the multicast flow in any VLAN, the switch forwards the flow to the member port in
the same VLAN.

SVGL (Shared VLAN Group Learning): In this mode, the hosts in different VLANs share thesame multicast flow. A host can request multicast flows across VLANs. By designating a Shared
VLAN, you can only forward the multicast flows received in this Shared VLAN to other member
ports in different VLANs.

In the SVGL mode, IGMP Profile must be used to divide the multicast

address range, within which the multicast flow can be forwarded across VLANs. By default, allgroup range is not within the SVGL range and all multicast flows are dropped. As shown in
Figure-3:


IVGL-SVGL mode: also known as promiscuous mode. In this mode, the IVGL mode and the SVGL
mode can co-exist. Use IGMP Profile to divide a set of multicast address range to the SVGL, within
which the member port of the multicast forwarding entry can be forwarded across VLANs andwithout which the member ports are forwarded in the same VLAN.
SVGL mode and IVGL-SVGL mode conflict with the IP multicast function.
PIM Snooping must depend on either IVGL or IVGL-SVGL mode of IGMP Snooping. Use noip igmp snooping command to disable IGMP Snooping after PIM Snooping is disabled.

Configuration

The following example enables IGMP Snooping and enters the IVGL mode.

ExamplesRuijie(config)# ip igmp snooping ivgl

The following example enables IGMP Snooping and enters the SVGL mode.
Ruijie(config)# ip igmp snooping svgl
Ruijie(config)# ip igmp snooping svgl profile 1

The following example enables IGMP Snooping and enters the IVGL-SVGL mode.
Ruijie(config)# ip igmp snooping ivgl-svgl
Ruijie(config)# ip igmp snooping svgl profile 1

Platform

N/A

Description

2-4

Command Reference

IGMP Snooping Commands

2.6 ip igmp snooping disable
Use this command to disable layer-2 multicast on a layer-2 interface.
Use the no or default form of this command to restore the default setting.
ip igmp snooping disable
no ip igmp snooping disable
default ip igmp snooping disable

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

This function is enabled by default.

Interface configuration mode

When this command is run on a layer-2 interface, it will not process the IGMP packet, namely, it cannot
generate layer-2 multicast entry to forward the multicast traffic on layer-2 and this port cannot be
configured as a static member port.

Configuration

The following example disables layer-2 multicast on a layer-2 interface.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ip igmp snooping disable

Platform

N/A

Description

2.7 ip igmp snooping dyn-mr-aging-time
Use this command to set the aging time of a dynamic routing interface.
Use the no or default form of this command to restore the default setting.
ip igmp snooping dyn-mr-aging-time seconds
no ip igmp snooping dyn-mr-aging-timedefault ip igmp snooping dyn-mr-aging-timeParameter
Description

Parameter

Description

seconds

Aging time from 1 to 3,600 in the unit of seconds

Defaults

The default is 300 seconds.

Command

Global configuration mode

2-5

Command Reference

IGMP Snooping Commands

Mode

Usage Guide

If a dynamic routing interface does not receive IGMP query packets or PIM hello packets before aged,
this interface will be deleted.
When the dynamic routing interface learning function is enabled, this command sets the aging time of
the routing interface. If the aging time is set too short, the routes may be added and deleted frequently.

Configuration

The following example sets the aging time of the routing interface that the switch learns dynamically to

Examples

100 seconds.
Ruijie(config)# ip igmp snooping dyn-mr-aging-time 100

Platform

N/A

Description

2.8 ip igmp snooping fast-leave enable
Use this command to enable the fast leave function.
Use the no or default form of this command to restore the default setting.
ip igmp snooping fast-leave enable
no ip igmp snooping fast-leave enable
default ip igmp snooping fast-leave enable

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

This function is disabled by default.

Global configuration mode

After you execute this command to enable the fast-leave function, the system will remove thecorresponding multicast group on the corresponding interface upon the receipt of the IGMP leavemessage.
Subsequently, when the system receives a specific group query packet, the system does not forward it
to the corresponding interface. Leave packets include IGMPv2 leave packets and IGMPv3 reportpackets of the include type without source addresses. The fast leave function applies to scenarios inwhich one interface is connected to only one host. This function saves bandwidth and resources.

Configuration

The following example enables the fast leave function.

ExamplesRuijie(config)# ip igmp snooping fast-leave enable

Platform

N/A

2-6

Command Reference

IGMP Snooping Commands

Description

2.9 ip igmp snooping port-fast-leave enable
Use this command to enable port-fast-leave.
Use the no or default form of this command to restore default settings.
ip igmp snooping port-fast-leave enable
no ip igmp snooping port-fast-leave enable
default ip igmp snooping port-fast-leave enable

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

By default, this function is disabled.

Global configuration mode

With this command configured, the system will delete the multicast groups on related interfaces as it
receives IGMP leave packet. Then, as it receives query packets from a specific multicast group, it can
not forward this packet to the related interface. The IGMPv2 leave packet without source addresses andthe IGMPv3 report message with types included are not included in the leave packet. This fast leave
function applies to scenarios in which one interface is connected to only one host. This function saves
bandwidth and resources.

Configuration

The following example enables the fast leave function.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ip igmp snooping port-fast-leave enable

Platform

N/A

Description

2.10 ip igmp snooping filter
Use this command to specify the profile for ports.
Use the no or default form of this command to restore the default setting.
ip igmp snooping filter profile-number
no ip igmp snooping filter profile-number
default ip igmp snooping filter

Use this command to specify the profile for VLANs.
Use the no or default form of this command to restore the default setting.

2-7

Command Reference

IGMP Snooping Commands

ip igmp snooping vlan vid filter profile-number
no ip igmp snooping vlan vid filter
default ip igmp snooping vlan vid filter

Parameter
Description

Defaults

CommandMode

Parameter

Description

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

profile-number

Profile number from 1 to 1024

This function is disabled by default.

Global configuration mode/Interface configuration mode

Usage Guide

A specific profile must be created before association.

Configuration

The following example specifies profile 1 for interface GigabitEthernet 0/17.

ExamplesRuijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ip igmp snooping filter 1

Platform

N/A

Description

2.11 ip igmp snooping host-aging-time
Use this command to configure the aging time of IGMP dynamic ports.
Use the no or default form of this command to restore the default setting.
ip igmp snooping host-aging-time seconds
no ip igmp snooping host-aging-timedefault ip igmp snooping host-aging-timeParameter

Parameter

Description

Description

seconds

Aging time. The unit is second. The value ranges from 1 to 65,535.

Defaults

The default is 260 seconds.

Command

Global configuration mode

Mode

Usage Guide

The aging time of a dynamic port is set by the system when the port receives an IGMP packet from thehost for joining a certain IP multicast group.
When such an IGMP packet is received, the system resets the aging timer for the port. The duration ofthis timer is determined by host-aging-time. If the timer expires, the system determines that there is

2-8

Command Reference

IGMP Snooping Commands

no host in this port for receiving multicast packets. The multicast device removes the port from the
IGMP Snooping group. After the ip igmp snooping host-aging-time command is executed, the aging
time will be determined by host-aging-time. This command takes effect only after the system receives
the next IGMP packet. This command does not change the current aging time.

Configuration

The following example sets the aging time to 30 seconds.

ExamplesRuijie(config)# ip igmp snooping host-aging-time 30

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

2.12 ip igmp snooping l2-entry-limit
Use this command to set the maximum number of multicast groups.
Use the no or default form of this command to restore the default setting.
ip igmp snooping l2-entry-limit number
no ip igmp snooping l2-entry-limit
default ip igmp snooping l2-entry-limit

Parameter

Parameter

Description

Description

numberNumber of multicast groups. The value ranges from 0 to 6144.

Defaults

The default is 6144.

Command Mode

Global configuration mode

Usage Guide

The maximum number of multicast groups includes the multicast groups in all ports of all
VLANs (including dynamic and static multicast groups). When the number of multicast groups
reaches the limit, learning new group records and configuring new static multicast groupports are not allowed.

Configuration

The following example sets the maximum number of multicast groups to 2000.

ExamplesRuijie(config)# ip igmp snooping l2-entry-limit 2000

Related Commands

Command

Description

show ip igmp snooping

Displays the maximum number of multicast groups.

Platform Description

N/A

2-9

Command Reference

IGMP Snooping Commands

2.13 ip igmp snooping max-groups
Use this command to configure the maximum number of groups that can be added dynamically to thisinterface.
Use the no or default form of this command to restore the default setting.
ip igmp snooping max-groups number
no ip igmp snooping max-groups
default ip igmp snooping max-groups

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

number

The maximum group number from 0 to 6144.

No maximum group number is configured by default.

Interface configuration mode

If a maximum number of multicast groups are configured, the device will no longer receive and process
IGMP Report messages when the number of multicast groups on this interface is beyond the range.

Configuration

The following example configures the maximum number of multicast groups to 100 on the megabit

Examplesinterface 0/17:
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ip igmp snooping max-group 100

Platform

N/A

Description

2.14 ip igmp snooping mrouter learn pim-dvmrp
Use this command to configure a device to listen to the IGMP Query/Dvmrp or PIM Help packets
dynamically in order to automatically identify a routing interface
Use the no form of this command to disable the dynamic learning.
Use the default form of this command to restore the default setting.
ip igmp snooping [ vlan vid ] mrouter learn pim-dvmrp
no ip igmp snooping [ vlan vid ] mrouter learn pim-dvmrp
default ip igmp snooping [ vlan vid ] mrouter learn pim-dvmrp

Parameter
Description

Parameter

Description

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

2-10

Command Reference

Defaults

IGMP Snooping Commands

This function is enabled by default.

CommandMode

Global configuration mode

Usage Guide

Routing interface is a port through which a multicast device (with IGMP Snooping enabled) is directly
connected to a multicast neighbouring device (with multicast routing protocols enabled).
By default, the dynamic routing interface learning function is enabled. You can use the no form of thiscommand to disable this function and clear all routing interfaces learnt dynamically. With dynamic
routing interface learning function disabled globally, the function of all vlans will be disabled. Beside, withthis function enabled globally, if the function of specified vlan is disabled, the dynamic routing interface
learning function of the corresponding vlan is disabled. When the source port check function is enabled,
only the multicast flow enters from the routing interface is legal and it is forwarded to the registeredinterface by the multicast equipment, the multicast flow from the non routing interface is considered tobe the illegal and is discarded. With the source port check function enabled, the dynamic routinginterface learning function will improve the application flexibility of IGMP snooping.

Configuration

The following example enables the dynamic routing interface learning function on VLAN 1.

ExamplesRuijie(config)# no ip igmp snooping mrouter learn pim-dvmrp
Ruijie(config)# ip igmp snooping vlan 1 mrouter learn pim-dvmrp

Platform

N/A

Description

2.15 ip igmp snooping preview
Use this command to allow the user to preview the specific multicast streams when the user doesn't
have access to such multicast streams.
Use no or default form of this command to disable multicast preview.
ip igmp snooping preview profile-number
no ip igmp snooping preview
default ip igmp snooping preview

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

profile-number

Profile number (1-1024)

This function is disabled by default.

Global configuration mode

Apply the IGMP Profile to a multicast preview function. When the user doesn't have access to the

2-11Command Reference

IGMP Snooping Commands

multicast streams (namely the user might be filtered by IGMP Snooping filter), it can allow the user topreview partial contents. This function shall be used in conjunction with IGMP Snooping filter or
multicast control in order to realize effective multicast preview.

Configuration

The following example associates the profile 2 to the GigabitEthernet 0/17 and associates multicast

Examplespreview with profile 1.
Ruijie(config)# ip igmp snooping preview 1
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# ip igmp snooping filter 2

Platform

N/A

Description

2.16 ip igmp snooping preview interval
Use this command to configure the interval that allows the user to preview the specific multicast streams
when the user doesn't have access to such multicast streams.
Use no or default form of this command to restore the default setting.
ip igmp snooping preview interval seconds
no ip igmp snooping preview interval
defaut ip igmp snooping preview intervalParameter
Description

Defaults

CommandMode

Parameter

Description

seconds

Preview interval from 1 to 300 in the unit of seconds

The default is 60 seconds.

Global configuration mode

Usage Guide

N/A

Configuration

The following example sets the multicast preview interval as 100 seconds on the 100M port of 0/1:

ExamplesRuijie(config)# ip igmp snooping preview 1
Ruijie(config)# ip igmp snooping preview interval 100

Platform

N/A

Description

2.17 ip igmp snooping querier
Use this command to enable the IGMP querier.

2-12

Command Reference

IGMP Snooping Commands

Use no or default form of this command to restore the default setting.
ip igmp snooping [ vlan vid ] querier
no ip igmp snooping [ vlan vid ] querier
default ip igmp snooping [ vlan vid ] querier

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

This function is disabled by default.

Global configuration mode

After globally enabling the IGMP querier, you must enable the IGMP querier function in VLAN to activate
this function.
If the IGMP querier function is disabled globally, the IGMP querier will be disabled in all VLANs.

Configuration

The following example enables the IGMP querier function in VLAN 2.

ExamplesRuijie(config)# ip igmp snooping querier
Ruijie(config)# ip igmp snooping vlan 2 querier

Platform

N/A

Description

2.18 ip igmp snooping querier address
Use this command to specify a source IP address for IGMP querier.
Use no or default form of this command to remove the source IP address configured.
ip igmp snooping [ vlan vid ] querier address ip-address
no ip igmp snooping [ vlan vid ] querier addressdefault ip igmp snooping [ vlan vid ] querier address

Parameter
Description

Defaults

CommandMode

Parameter

Description

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

ip-address

Source IP address of the IGMP querier.

N/A

Global configuration mode

2-13

Command Reference

Usage Guide

IGMP Snooping Commands

After enabling IGMP querier, you msut configure a source IP address for the IGMP querier to activate
this function.
If the IGMP querier source IP has been specified in VLAN, the source IP configured in the relevant
VLAN will be used first.

Configuration

The following example specifies the source IP of the IGMP querier as 1.1.1.1 on the device.

ExamplesRuijie(config)# ip igmp snooping querier address 1.1.1.1
The following example specifies the source IP of the IGMP querier as 1.1.1.1 in VLAN 3.

Ruijie(config)# ip igmp snooping vlan 3 querier address 1.1.1.1
Platform
Description

2.19 ip igmp snooping querier max-response-time
Use this command to configure the maximum response time of the IGMP querier.
Use no or default form of this command to restore to the default setting.
ip igmp snooping [ vlan vid ] querier max-response-time seconds
no ip igmp snooping [ vlan vid ] querier max-response-timedefault ip igmp snooping [ vlan vid ] querier max-response-timeParameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Descriptionnum

Maximum response time from 1 to 25 in the unit of seconds

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

The default is 10 seconds.

Global configuration mode

If the maximum response time has been specified in the corresponding VLAN, the value specified in
VLAN will be used first.

Configuration

The following example specifies the maximum response time of the IGMP querier on the device.

ExamplesRuijie(config)# ip igmp snooping querier max-response-time 15
The following example specifies the maximum response time of the IGMP querier in VLAN 3.
Ruijie(config)# ip igmp snooping vlan 3 querier max-response-time 15

Platform

N/A

Description

2-14

Command Reference

IGMP Snooping Commands

2.20 ip igmp snooping querier query-interval
Use this command to specify the interval for IGMP querier to send query packets.
Use no or default form of this command to restore the default setting.
ip igmp snooping querier query-interval seconds
no ip igmp snooping querier query-interval
default ip igmp snooping [ vlan vid ] querier query-intervalParameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

seconds

Query interval from 1 to 18,000 in the unit of seconds

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

The default is 60 seconds.

Global configuration mode

If the query interval has been configured in the corresponding VLAN, the value specified in VLAN will be
used first.

Configuration

The following example configures the query interval on the device.

ExamplesRuijie(config)# ip igmp snooping querier query-interval 100
The following example configures the query interval in VLAN 3.
Ruijie(config)# ip igmp snooping vlan 3 querier query-interval 100

Platform

N/A

Description

2.21 ip igmp snooping querier timer expiry
Use this command to specify the expiration timer for non-querier.
Use no form of this command to restore the default setting.
ip igmp snooping [ vlan vid ] querier timer expiry seconds
ip igmp snooping [ vlan vid ] querier timer expiry seconds
default ip igmp snooping [ vlan vid ] querier timer expiry

Parameter
Description

Defaults

Parameter

Description

seconds

Theexpiration timer from 60 to 300 in the unit of seconds

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

The default is 125 seconds.

2-15

Command Reference

CommandMode

Usage Guide

IGMP Snooping Commands

Global configuration mode

After globally enabling IGMP querier, if the device is elected as a non-querier, execute this command tochange the expiration timer for non-querier.
If expiration timer has been configured in the corresponding VLAN, the value specified in VLAN will be
used first.

Configuration

The following example configures the non-querier expiration timer on the device.

ExamplesRuijie(config)# ip igmp snooping querier timer expiry 60
The following example configures the non-querier expiration timer in VLAN 3.
Ruijie(config)# ip igmp snooping vlan 3 querier timer expiry 60

Platform

N/A

Description

2.22 ip igmp snooping querier version
Use the following commands to specify IGMP Snooping querier version.
ip igmp snooping [ vlan vid ] querier version 1
ip igmp snooping [ vlan vid ] querier version 2
Use no or default form of this command to restore to the default setting.
no ip igmp snooping [ vlan vid ] querier version
default ip igmp snooping [ vlan vid ] querier version

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

vlan vid

VLAN ID. By default, the specified version is supported on all VLANs.

The default version is IGMPv2.

Global configuration mode

If an IGMP querier version has been configured in a VLAN, the version specified in the VLAN will be
used first.
IGMPv1 and IGMPv2 are supported.

Configuration

The following example configures IGMP querier version on the device.

ExamplesRuijie(config)# ip igmp snooping querier version 1
The following example configures IGMP querier version on VLAN3.
Ruijie(config)# ip igmp snooping vlan 3 querier version 1

2-16

Command Reference

Platform

IGMP Snooping Commands

N/A

Description

2.23 ip igmp snooping query-max-response-time
Use this command to specify the time for the switch to wait for the member join message after receiving
the query message.
Use the no or default form of this command to restore the default setting.
ip igmp snooping query-max-response-time seconds
no ip igmp snooping query-max-resposne-timedefault ip igmp snooping query-max-response-timeParameter
Description

Parameter

Description

seconds

The aging time of the routing inerface that the switch learns
dynamically, in the range from 1 to 65.535

Defaults

CommandMode

Usage Guide

The default is 10 seconds.

Global configuration mode

You can specify the time for the switch to wait for the member join message after receiving the query
message. If the switch does not receive the member join message in the specified time, it considers thatthe member has left and then deletes the member.
This command lets you adjust the waiting time after receiving the query message. This command takes
effect only after the switch receives the next member join message. This command does not change thecurrent wait time.

Configuration

The following examples sets the aging time of the routing interface that the switch learns dynamically to

Examples

100 seconds.
Ruijie(config)# ip igmp snooping query-max-response-time 100

Platform

N/A

Description

2.24 ip igmp snooping suppression enable
Use this command to enable IGMP snooping suppression.
Use the no or default form of this command to restore the default setting.
ip igmp snooping suppression enable
no ip igmp snooping suppression enable

2-17

Command Reference

IGMP Snooping Commands

default ip igmp snooping suppression enable

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

This function is disabled by default.

Global configuration mode

When this function is enabled, IGMP Snooping only forwards the first report from a specific VLAN orgroup, and suppresses the following reports to constrain traffic in the networks.
This function is only supported on IGMPv1 and IGMPv2 reports.

Configuration

The following example enables IGMP snooping suppression on the device.

ExamplesRuijie(config)# ip igmp snooping suppression enable

Platform

N/A

Description

2.25 ip igmp snooping suppression svgl vlan enable
Use this command to enable primary VLAN suppression of SVGL of IGMP snooping.
Use the no or default form of this command to restore default settings.
ip igmp snooping suppression svgl vlan enable
no ip igmp snooping suppression svgl vlan enable
default ip igmp snooping suppression svgl vlan enable

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

By default, this function is enabled.

Global configuration mode

With this function enabled, IGMP snooping will forward the first report from a specific VLAN or grouponly, suppress follow-up reports and restrict network traffic. This function only applies to IGMPv2 reportand IGMPv2 report.

Configuration

The following example enables primary VLAN suppression of SVGL of IGMP snooping.

2-18

Command Reference

IGMP Snooping Commands

ExamplesRuijie(config)# ip igmp snooping suppression svgl vlan enable

Platform

N/A

Description

2.26 ip igmp snooping suppression sip
Use this command to customize the function of IGMP Snooping suppressing the source IP of packets.
Use the no or default of this command to restore default settings.
ip igmp snooping suppression vlan vid sip address
no ip igmp snooping suppression vlan vid sip
default ip igmp snooping suppression vlan vid sip

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

By default, the source IP address of IGMP snooping suppression is 0.0.0.0.

Global configuration mode

With the IGMP snooping suppression enabled, the device can globally customize the source IP addressof the report packet as well as the source address based on VLAN. The suppression can only be applied
to an IGMPv1 and IGMPv2 report packet, not an IGMPv3 report packet.

Configuration

The following example customizes the source IP address of report packet.

ExamplesRuijie(config)# ip igmp snooping suppression vlan 1 sip 1.1.1.1

Platform

N/A

Description

2.27 ip igmp snooping svgl profile
Use this command to specify the multicast group address range applied in the SVGL/IVGL-SVGL mode.
Use the no or default form of this command to restore the default setting.
ip igmp snooping svgl profile profile-number
no ip igmp snooping svgl profile
default ip igmp snooping svgl profile

Parameter
Description

Parameter

Description

profile-number

Profile number, in the range of 1-1,024

2-19

Command Reference

Defaults

CommandMode

Usage Guide

IGMP Snooping Commands

No profile is associated.

Global configuration mode

When the IGMP Snooping works in the SVGL and IVGL-SVGL mode, a profile shall be associated to
specify the multicast group address range applied in the SVGL or IVGL-SVGL mode.

Configuration

The following example specifies the profile 2 applied in SVGL mode.

ExamplesRuijie(config)# ip igmp snooping svgl profile 2

Platform

N/A

Description

2.28 ip igmp snooping svgl subvlan
Use this command to specify the subvlan of multicast VLAN.
Use the no or default form of this command to restore the default settings.
ip igmp snooping svgl subvlan [ vid-range ]no ip igmp snooping svgl subvlan [ vid-range ]default ip igmp snooping svgl subvlan [ vid-range ]Parameter
Description

Defaults

CommandMode

Parameter

Description

vid-range

VLAN ID or range of VLAN ID

By default, all VLANs except shared VLANs serve as its sub VLANs.

Global configuration mode

Usage Guide

This command only takes effect in SVGL and IVGL-SVGL mode.

Configuration

The following example specifies VLAN 3 as the shared VLAN and VLAN 2, VLAN 5 to 7 as the sub

ExamplesVLANs.
Ruijie(config)# ip igmp snooping svgl vlan 3
Ruijie(config)# ip igmp snooping svgl subvlan 2,5-7

Platform

N/A

Description

2-20

Command Reference

IGMP Snooping Commands

2.29 ip igmp snooping svgl vlan
Use this command to specify the shared VLAN in SVGL mode.
Use the no form of this command to restore the default setting.
ip igmp snooping svgl vlan vid
no ip igmp snooping svgl vlan
default ip igmp snooping svgl vlan

Parameter
Description

Defaults

CommandMode

Parameter

Description

vid

VLAN ID

By default , the shared VLAN is VLAN 1.

Global configuration mode

Usage Guide

This command only works in the SVGL and IVGL-SVGL mode.

Configuration

The following example specifies the vlan2 as the shared VLAN.

ExamplesThe following example specifies VLAN 3 as the shared VLAN and VLAN 2, VLAN 5 to 7 as the sub
VLANs.
Ruijie(config)# ip igmp snooping svgl vlan 3
Ruijie(config)# ip igmp snooping svgl subvlan 2,5-7

Platform

N/A

Description

2.30 ip igmp snooping tunnel
Use this command to enable 802.1Q tunneling (QinQ) support for IGMP Snooping.
Use the no or default form of this command to restore the default setting.
ip igmp snooping tunnel
no ip igmp snooping tunnel
default ip igmp snooping tunnel

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled.

Command

Global configuration mode

2-21

Command Reference

IGMP Snooping Commands

Mode

Usage Guide

After IGMP Snooping is enabled and dot1q-tunnel port is configured on the device, IGMP packets
received from dot1q-tunnel port will be handled in two ways:
First: QinQ transmits IGMP packets transparently. Create multicast entries in the VLAN to which
the IGMP packets belong, and forward IGMP packets in the VLAN.

For example: It is assumed that IGMP Snooping has been enabled on the device; Port A is a
dot1q-tunnel port; the default VLAN of Port A is VLAN 1, and packets from VLAN 1 and VLAN 10
are allowed by Port A. When multicast requests of VLAN 10 are sent to port A, IGMP Snooping will
create the multicast entry of VLAN 10 and forward the multicast requests to the router port of VLAN
10.

Second: Create multicast entries in the default VLAN to which the dot1q-tunnel ports belong, andforward multicast packets in the default VLAN of dot1q-tunnel port after inserting the VLAN Tag ofthe default VLAN of dot1q-tunnel port.

For example: It is assumed that IGMP Snooping has been enabled on the device; Port A is a
dot1q-tunnel port; the default VLAN of port A is VLAN 1, and packets from VLAN 1 and VLAN 10
are allowed Port A. When multicast requests of VLAN 10 are sent to Port A, IGMP Snooping will
create the multicast entry of VLAN 1 and insert the VLAN Tag of VLAN 1 into multicast requests
before forwarding the multicast requests to the router port of VLAN 1.
By default, the second way is used.

Configuration

The following example enables QinQ support for IGMP Snooping.

ExamplesRuijie(config)# ip igmp snooping tunnel

Platform

N/A

Description

2.31 ip igmp snooping vlan
Use this command to enable the IGMP Snooping in the specified VLAN and enter IVGL mode.
Use the no form of this command is used to disable the IGMP Snooping.
Use the default form of this command to restore the default setting.
ip igmp snooping vlan vid
no ip igmp snooping vlan vid
default ip igmp snooping vlan vid

Parameter
Description

Defaults

Parameter

Description

vid

VLAN ID in the range from 1 to 4,094

If IGMP Snooping (IVGL mode) is enabled globally, all VLANs are enabled with IGMP Snooping (IVGLmode).
If IGMP Snooping (IVGL mode) is not enabled globally, all VLANs are not enabeld with IGMP Snooping

2-22

Command Reference

IGMP Snooping Commands(IVGL mode).

CommandMode

Usage Guide

Global configuration modeUse this command to enable or disable the IGMP snooping on the specified vlan.
The PIM Snooping in the specified VLAN works only when IGMP Snooping is configured. To
disable PIM Snooping, you must disable IGMP Snooping in the VLAN first, or disabling will failand be prompted.

Configuration

The following example enters IVGL mode and disables the IGMP Snooping in the VLAN 2.

ExamplesRuijie(config)# ip igmp snooping ivgl
Ruijie(config)# no ip igmp snooping vlan 2

Platform

N/A

Description

2.32 ip igmp snooping vlan mrouter interface
Use this command to configure a static routing interface.
Use the no form of this command to delete a static routing interface.
Use the default form of this command to restore the default setting.
ip igmp snooping vlan vid mrouter interface interface-type interface-number
no ip igmp snooping vlan vid mrouter interface interface-type interface-number
default ip igmp snooping vlan vid mrouter interface interface-type interface-number

Parameter
Description

Parameter

Description

vid

VLAN ID in the range from 1 to 4,094

interface-type
interface-number

Defaults

CommandMode

Usage Guide

Interface ID

No static routing interface is configured by default.

Global configuration mode

A dynamic routing interface is learned dynamically through IGMP Snooping. A static routing interface isconfigured by using this command and cannot age.
When an interface is configured as a static routing interface, all multicast streams received on thisinterface will be forwarded.
When the source port check function is enabled, only the multicast flows from the routing interface areforwarded, and other flows will be discarded.

2-23

Command Reference

IGMP Snooping Commands

Configuration

The following example configures a static routing interface.

ExamplesRuijie(config)# ip igmp snooping vlan 1 mrouter interface gigabitethernet 0/17

Platform

N/A

Description

2.33 ip igmp snooping vlan static interface
Use this command to configure a static member interface of a multicast group.
Use the no form of this command to delete a static member interface from a multicast group.
Use the default form of this command to restore the default setting.
ip igmp snooping vlan vid static ip-address interface interface-type interface-number
no ip igmp snooping vlan vid static ip-address interface interface-type interface-number
default ip igmp snooping vlan vid static ip-address interface interface-type interface-number

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

vid

VLAN ID in the range from 1 to 4,094

ip-address

Multicast IP addressinterface-id

Interface ID

No static member interface of any multicast group is configured by default.

Global configuration mode

The IGMP Snooping GDA table contains VLAN IDs (VIDs), group addresses, routing interface (static ordynamic) ID, and member interface ID. Among them, the VID and group address identify a forwarding
entry; the static routing interfaces will not age and cannot be deleted by using the clear ip igmp
snooping gda-table command.

Configuration

The following example configures a static member interface for the multicast group 224.1.1.1.

ExamplesRuijie(config)# ip igmp snooping vlan 1 static 224.1.1.1 interface
gigabitethernet 0/17

Platform

N/A

Description

2.34 permit
Use this command to permit the multicast forwarding for specified ranges of a specified profile.
permit2-24

Command Reference

Parameter
Description

Defaults

CommandMode

Usage Guide

IGMP Snooping Commands

Parameter

Description

N/A

N/A

The forwarding of the multicast streams in the range specified by the profile is denied.

Profile configuration mode

A profile is used to filter a group of multicast packets, so as to assist other features.
Configuration steps:
1.

Use the ip igmp profile command to create a profile and enter profile configuration mode.

2. Use the range command to define a range for the profile.
3.

Use the permit command to permit the multicast forwarding for the profile.

Configuration

The following example permits the forwarding of the multicast streams from 224.2.2.2 to 224.2.2.244 of

Examplesprofile 1.
Ruijie(config)# ip igmp profile 1
Ruijie(config-profile)# range 224.2.2.2 224.2.2.244
Ruijie(config-profile)# permit

Platform

N/A

Description

2.35 range
Use this command to define a range for a specific profile.
Use the no form of the command to remove the range from the profile.
range low-ip-address [high-ip-address]
no range low-ip-address [high-ip-address]

Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

low-ip-address

Start address of a range

high-ip-address

End address of a range

No range is defined for a profile by default.

Profile configuration mode

A profile is used to filter a group of multicast packets, so as to assist other features.

2-25

Command Reference

IGMP Snooping Commands

Configuration steps:
1.

Use the ip igmp profile command to create a profile and enter profile configuration mode.

2. Use the range command to define a range for the profile.
3.

Use the permit command to permit the multicast forwarding for the profile.

Configuration

The following is an example of allowingpermits the forwarding of the multicast streams from

Examplesto 224.2.2.244: of profile 1.

224.2.2.2

Ruijie(config)# ip igmp profile 1
Ruijie(config-profile)# range 224.2.2.2 224.2.2.244224.2.2.2
Ruijie(config-profile)# permit

Platform

N/A

Description

2.36 show ip igmp profile
Use this command to display the profile information.
show ip igmp profile
show ip igmp profile profile-number

Parameter
Description

Defaults

CommandMode

Parameter

Description

profile-number

Displays configuration information of the designated profile.

N/A

Privileged EXEC mode

Usage Guide

Use this command to display the profile information.

Configuration

The following example displays the profile information.

ExamplesRuijie# show ip igmp profile
Profile 1
Permitrange 224.0.1.0, 239.255.255.255

2.37 show ip igmp snooping
Use this command to display related information of IGMP Snooping.
show ip igmp snooping [ gda-table | interfaces interface-type interface-number | mrouter | statistics[ vlan vid ] | querier [ detail | vlan vid ] ]2-26

Command Reference

Parameter
Description

Parametervlan vidinterface-type
interface-number

Defaults

CommandMode

IGMP Snooping Commands

Description
VLAN ID. By default, IGMP Snooping information of all VLANs are
displayed.
Interface type and number.

N/A

Privileged EXEC mode

Usage Guide

N/A

Configuration

The following example displays global IGMP Snooping information.

ExamplesRuijie# show ip igmp snooping
IGMP Snooping running mode: IVGLIGMP Snooping L2-entry-limit: 65536
Source port check: Disable
Source ip check: Disable
IGMP Fast-Leave: Disable
IGMP Report suppress: Disable
IGMP Global Querier: Disable
IGMP Preview: Disable
IGMP Tunnel: Disable
IGMP Snooping version: 2
IGMP Snooping version: 2IGMP Preview group aging time : 60(Seconds)
Dynamic Mroute Aging Time : 300(Seconds)
Dynamic Host Aging Time : 260(Seconds)
The following example displays VLAN1 IGMP Snooping information.
Ruijie# show ip igmp snooping vlan 1
IGMP Snooping running mode: IVGLIGMP Snooping L2-entry-limit: 65536
Global IGMPv2 Fast-Leave :Disable
Global multicast router learning mode :Enable
Query Max Response Time: 10 (Seconds)
Dynamic Mroute Aging Time : 300(Seconds)
Dynamic Host Aging Time : 260(Seconds)
vlan 1------------IGMP Snooping state: Enable
Multicast router learning mode: pim-dvmrp
IGMP Fast-Leave: Disable

2-27

Command Reference

IGMP Snooping Commands

IGMP VLAN querier: Disable

IGMP VLAN Mode: STATIC
Platform

N/A

Description

2-28

Network Management & Monitoring Commands
1. SNMP Commands
2. RMON Commands(beta)
3. NTP Commands
4. SNTP Commands(beta)
5. SPAN Commands

Command Reference

SNMP Commands

1 SNMP Commands
1.1 no snmp-server
Use this command to disable the SNMP agent function.
no snmp-server

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

SNMP agent is enabled by default.

Command

Global configuration mode.

mode

Usage Guide

This command disables the SNMP agent services of all versions supported on the device.

Configuration

The following example disables the SNMP agent.

ExamplesRuijie(config)# no snmp-server

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.2 show snmp
Use this command to display the SNMP configuration.
show snmp [ mib | user | view | group | host | process-mib-time ]Parameter
Description

Parameter

Description

mib

Displays the SNMP MIBs supported.

user

Displays the SNMP user information.

view

Displays the SNMP view information.

group

Displays the SNMP user group information.

host

Displays the explicit host configuration.

process-mib-time

Displays the MIB node requiring the longest processing time.

1-2

Command Reference

SNMP Commands

Defaults

N/A

CommandPrivileged EXEC mode.

mode

Usage Guide

N/A

Configuration

The example below displays the SNMP configuration:

ExamplesRuijie# show snmp
Chassis: 60FF60
0 SNMP packets input
0 Bad SNMP version errors
0 Unknown community name0 Illegal operation for community name supplied
0 Encoding errors
0 Number of requested variables
0 Number of altered variables
0 Get-request PDUs
0 Get-next PDUs
0 Set-request PDUs
0 SNMP packets output
0 Too big errors (Maximum packet size 1472)
0 No such name errors
0 Bad values errors
0 General errors
0 Response PDUs
0 Trap PDUs
SNMP global trap: disabled
SNMP logging: disabled
SNMP agent: enabled

RelatedCommands

Platform

Command

Description

snmp-server chassis-id

Specifies the SNMP system sequence number.

N/A

Description

1.3 snmp trap link-status
Use this command to enable the interface to send link traps. Use the no form of this command todisable the interface to send link traps.
snmp trap link-status

1-3

Command Reference

SNMP Commands

no snmp trap link-status

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

Sending link traps on the interface is enabled by default. If the interface link status changes, SNMP
link traps will be sent.

Command

Interface configuration mode

mode

Usage Guide

This command can be configured on the Ethernet interface, aggregate ports and SVI interfaces.

Configuration

The following example disables the interface to send link traps.

ExamplesRuijie(config)# interface gigabitEthernet 0/17
Ruijie(config-if–GigabitEthernet 0/17)# no snmp trap link-status

The following example enables the interface to send link traps.
Ruijie(config)# interface gigabitEthernet 0/17

Ruijie(config-if–GigabitEthernet 0/17)# snmp trap link-status
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.4 snmp-server chassis-id
Use this command to specify the SNMP chassis ID. Use the no form of this command to restore thedefault chassis ID.
snmp-server chassis-id text
no snmp-server chassis-id

Parameter
Description

Parameter

Description

text

SNMP chassis ID: numerals or characters.

Defaults

The default is 60FF60.

Command

Global configuration mode.

mode

1-4

Command Reference

Usage Guide

SNMP Commands

The SNMP chassis ID is generally the serial number of the device to facilitate identification. The
SNMP chassis ID can be displayed through the show snmp command.

Configuration

The following example specifies the SNMP chassis ID as 123456:

ExamplesRuijie(config)# snmp-server chassis-id 123456

RelatedCommands

Platform

Command

Description

show snmp

Displays the SNMP configuration.

N/A

Description

1.5 snmp-server community
Use this command to specify the SNMP community access string. Use the no form of this command
to remove the SNMP community access string.
snmp-server community [ 0 | 7 ] string [ view view-name ] [ [ ro | rw ] [ host ipaddr ] [ ipv6
ipv6-aclname ] [ aclnum ] [ aclname ]no snmp-server community [ 0 | 7 ] string

Parameter
Description

Parameter

Description

0

Indicates that the community string is in plaintext.

7

Indicates that the community string is in ciphertext.

stringCommunity string, which is the communication password between
the NMS and the SNMP agent

view-name

View nameroIndicates that the NMS can only read the variables of the MIB.

rw

Indicates that the NMS can read and write the variables of the MIB.

aclnumaclnameipv6-aclname
ipaddrAccess list number (1 to 199, and 1300 to 2699), which specifies the
IPv4 addresses that are permitted to access the MIB.
Access list name, which specifies the IPv4 addresses that are
permitted to access the MIB.
IPv6 access list name, which specifies the IPv6 addresses that are
permitted to access the MIB.
Specifies the IP address of the NMS to access the MIB.

Defaults

All communities are read only by default.

Command

Global configuration mode.

mode

1-5

Command Reference

Usage Guide

SNMP Commands

This command is an essential command to enable the SNMP agent function, such as specifying thecommunity attribute and IP addresses of NMS to access the MIB.
To disable the SNMP agent function, use the no snmp-server command.

Configuration

The following example defines a SNMP community access string named public, which can be

Examplesread-only.
Ruijie(config)# snmp-server community public ro

RelatedCommands

Platform

Command

Description

access-list

Defines an access list.

N/A

Description

1.6 snmp-server contact
Use this command to specify the system contact string. Use the no form of this command to remove
the system contact string.
snmp-server contact text
no snmp-server contact

Parameter
Description

Parameter

Description

text

Defines a system contact string.

Defaults

No system contact string is set by default.

Command

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example specifies the SNMP system contract i-net800@i-net.com.cn:

ExamplesRuijie(config)# snmp-server contact i-net800@i-net.com.cn

RelatedCommands

Platform

Command

Description

show snmp-server

Displays the SNMP configuration.

no snmp-server

Disables the SNMP agent function.

N/A

Description

1-6

Command Reference

SNMP Commands

1.7 snmp-server enable traps
Use this command to enable the SNMP agent to send the SNMP trap massage to NMS. Use the noform of this command to disable the SNMP agent to send the SNMP trap massage to NMS.
snmp-server enable traps [ notification-type ]no snmp-server enable traps

Parameter
Description

Parameter

Description

notification-typeSpecifies the type of trap messages.
authentication: Allow authentication notifications.
bridge: Bridge trap message.
entity: Entity Trap message.
mac-notification: MAC trap message.
snmp: SNMP trap message.
vrrp: VRRP trap message.

Defaults

Sending trap message to the NMS is disabled by default.

Command

Global configuration mode.

mode

Usage Guide

This command must be used together with the snmp-server host command to send the trap
message. Specifying no trap type indicates all trap messages are sent.

Configuration

The following example enables the SNMP agent to send the SNMP trap message.

ExamplesRuijie(config)# snmp-server enable traps snmp
Ruijie(config)# snmp-server host 192.168.12.219 public snmp

RelatedCommands

Command

Description

snmp-server hostSpecifies the SNMP host to send the SNMP
trap message.

Platform

N/A

Description

1.8 snmp-server flow-control
Use this command to configure the SNMP flow control. Use the no form of this command to restore
the default setting.
snmp-server flow-control pps countno snmp-server flow-control pps

1-7

Command Reference

Parameter
Description

Parameter

count

Defaults

The default count is 300.

Command

Global configuration mode.

SNMP Commands

Description
Indicates the number of SNMP requests processed per second,
ranging from 50 to 65,535.

mode

Usage Guide

N/A

Configuration

The following example configures the number of SNMP requests processed per second to 200.

ExamplesRuijie(config)# snmp-server flow-control pps 200

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.9 snmp-server group
Use this command to configure a new SNMP group. Use the no form of this command to remove a
specified SNMP group.
snmp-server group groupname { v1 | v2c | v3 { auth | noauth | priv } } [ read readview ] [ write
writeview ] [ access { [ ipv6 ipv6-aclname ] aclnum | aclname } ]no snmp-server group groupname {v1 | v2c | v3 { auth | noauth | priv } }Parameter
Description

Parameter

Description

v1 | v2c | v3

Specifies the SNMP version

authnoauthpriv

readview

writeview

Specifies authentication of a packet without encrypting it. This applies
to SNMPv3 only.
Specifies no authentication a packet. This applies to SNMPv3 only.
Specifies authentication of a packet with encryption. This applies to
SNMPv3 only.
Specifies a read-only view for the SNMP group. This view enables
you to view only the contents of the agent.
Specifies a write view for the SNMP group. This view enables you toenter data and configure the contents of the agent.

1-8

Command Reference

aclnumaclnameipv6-aclname

SNMP Commands
Access list number, which specifies the IPv4 addresses that are
permitted to access the MIB.
Name of the access list, which specifies the IPv4 addresses that are
permitted to access the MIB.
Name of the IPv6 access list, which specifies the IPv6 addresses thatare permitted to access the MIB.

Defaults

No SNMP groups are configured by default.

Command

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example configures a new SNMP group.

ExamplesRuijie(config)# snmp-server group mib2user v3 priv read mib2

RelatedCommands

Platform

Command

Description

show snmp group

Displays the SNMP group configuration.

N/A

Description

1.10 snmp-server hostUse this command to specify the SNMP host (NMS) to send the trap message. Use the no form of
this command to remove the specified SNMP host.
snmp-server host{ host-addr | ipv6 ipv6-addr } [ traps | informs ] [ version { 1 | 2c | 3 [ auth |noauth | priv ] ] community-string [ udp-port port-number ] [ notification-type ]no snmp-server host { host-addr | ipv6 ipv6-addr } [ traps | informs ] [ version { 1 | 2c | 3 { auth |noauth | priv } ] community-string [ udp-port port-number ]Parameter
Description

Parameter

Description

host-addr

SNMP host address

ipv6-addr

SNMP host address(ipv6)

trap | informs

Enables the host to send the SNMP notification as traps or informs.

version

SNMP version: v1, v2c or v3

auth | noauth | priv

Security level of SNMPv3 users

community-string

Community string or username (SNMPv3 version)

port-number

Port of the SNMP host in the range from 0 to 65535.

notification-type

The type of the SNMP trap message, such as snmp.

1-9Command Reference

SNMP Commands
If no type of the SNMP trap message is specified, all types of the
SNMP trap message will be included.

Defaults

No SNMP host is specified by default.

Command

Global configuration mode.

mode

Usage Guide

This command must be used together with the snmp-server enable traps command to send the
SNMP trap messages to NMS.
Multiple SNMP hosts can be configured to receive the SNMP trap messages. One host can use
different combinations of the types of the SNMP trap message, but the last configuration for the same
host will overwrite the previous configurations. In other words, to send different SNMP trap messages
to the same host, different combination of SNMP trap messages can be configured.

Configuration

The following example specifies an SNMP host to receive the SNMP event trap:

ExamplesRuijie(config)# snmp-server host 192.168.12.219 public snmp

RelatedCommands

Command

Description

snmp-server enable traps

Enables the SNMP agent to send the SNMP
trap message.

Platform

N/A

Description

1.11 snmp-server inform
Use this command to configure the resend times for inform requests and the inform request timeout.
Use the no form of this command to restore the default settings.
snmp-server inform { retries retry-time | timeout time }no snmp-server inform

Parameter
Description

Parameter

Description

retry-timeSpecifies the resend times for inform requests, ranging from 0 to 255.

time

Specifies the inform request timeout, ranging from 0 to 21,474,836.

Defaults

The default retry-num is 3, and the default timeout time is 15 seconds.

Command

Global configuration mode.

mode

Usage Guide

N/A

1-10

Command Reference

SNMP Commands

Configuration

The following example configures the resend times of inform requests to 5.

ExamplesRuijie(config)# snmp-server inform retries 5

The following example configures the inform request timeout to 20 seconds.
Ruijie(config)# snmp-server inform timeout 20

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.12 snmp-server location
Use this command to set the system location string. Use the no form of this command to remove thesystem location string.
snmp-server location text
no snmp-server location

Parameter
Description

Parameter

Description

text

String that describes the system location information.

Defaults

No system location string is set by default.

Command

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example sets the system location information:

ExamplesRuijie(config)# snmp-server location start-technology-city 4F of A Buliding

RelatedCommands

Platform

Command

Description

snmp-server contact

Sets the system contact information.

N/A

Description

1-11

Command Reference

SNMP Commands

1.13 snmp-server packetsize
Use this command to specify the largest size of the SNMP packet. Use the no form of this command
to restore the default value.
snmp-server packetsize byte-countno snmp-server packetsize

Parameter
Description

Parameter

Description

byte-countPacket size. The range is from 484 to 17,876 bytes

Defaults

The default is 1,472 bytes.

Command

Global configuration mode.

mode

Usage Guide

The following example specifies the largest size of SNMP packet as 1,492 bytes:
Ruijie(config)# snmp-server packetsize 1492

Configuration

N/A

ExamplesRelatedCommands

Command

Description

snmp-server queue-length

Specifies the length of the message queue foreach SNMP trap host.

Platform

N/A

Description

1.14 snmp-server queue-length
Use this command to specify the length of the message queue for each SNMP trap host. Use the noform of this command to restore the default value.
snmp-server queue-length lengthno snmp-server queue-length
Parameter
Description

Parameter

Description

lengthQueue length. The range is from 1 to 1000.

Defaults

The default is 100.

Command

Global configuration mode.

1-12

Command Reference

SNMP Commands

mode

Usage Guide

Use this command to adjust the length of message queue for each SNMP trap host for the purposesof controlling the speed of sending the SNMP trap messages.

Configuration

The following example specifies the length of message queue as 100.

ExamplesRuijie(config)# snmp-server queue-length 100

RelatedCommands

Platform

Command

Description

snmp-server packetsize

Specifies the largest size of the SNMP packet.

N/A

Description

1.15 snmp-server system-shutdown
Use this command to enable the SNMP message reload function. Use the no form of this command
to disable the SNMP message reload function.
snmp-server system-shutdown
no snmp-server system-shutdown

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The SNMP message reload function is disabled by default.

Command

Global configuration mode.

mode

Usage Guide

Use this command to enable the SNMP message reload function which may enable the system tosend the device reload traps to the NMS before the device is reloaded or rebooted.

Configuration

The following example enables the SNMP message reload function:

ExamplesRuijie(config)# snmp-server system-shutdown

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1-13

Command Reference

SNMP Commands

1.16 snmp-server trap-source
Use this command to specify the source interface of the SNMP trap message. Use the no form of thiscommand to restore the default value.
snmp-server trap-source interface-id
no snmp-server trap-source

Parameter
Description

Defaults

Parameter

Description

interface-id

Specifies the source interface of the SNMP trap messages.

By default, the IP address of the interface from which the SNMP packet is sent is just the source
address.

Command

Global configuration mode.

mode

Usage Guide

For easy management and identification, you can use this command to fix a local IP address as the
SNMP source address.

Configuration

The following example specifies the IP address of Ethernet interface 0/17 as the source address of

Examplesthe SNMP trap message:
Ruijie(config)# snmp-server trap-source gigabitethernet 0/17

RelatedCommands

Command

Description

snmp-server enable traps

Enables the SNMP agent to send the SNMP
trap massage to NMS.
Specifies the NMS host to send the SNMP trap

snmp-server hostmessage.

Platform

N/A

Description

1.17 snmp-server trap-timeout
Use this command to define the retransmission timeout time of the SNMP trap message. Use the noform of this command to restore the default value.
snmp-server trap-timeout seconds
no snmp-server trap-timeout

Parameter
Description

Parameter

Description

1-14

Command Reference
seconds

SNMP Commands
Timeout (in milliseconds) of retransmit the SNMP trap message. The
range is from 1 to 1,000.

Defaults

The default is 300 milliseconds.

Command

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example specifies the timeout period as 600 milliseconds.

ExamplesRuijie(config)# snmp-server trap-timeout 60

RelatedCommands

Command

Description

snmp-server queue-length

Specifies the length of message queue for the
SNMP trap host.
Specifies the NMS host to send the SNMP trap

snmp-server hostmessage.
Specifies the source address of the SNMP trap

snmp-server trap-source

message.

Platform

N/A

Description

1.18 snmp-server udp-port
Use this command to specify a port to receive SNMP packets. Use the no form of this command torestore the default setting.
snmp-server udp-port port-number
no snmp-server udp-port

Parameter
Description

Parameter

Description

port-number

Specifies a port to receive the SNMP packets.

Defaults

The default is 161.

Command

Global configuration mode.

1-15

Command Reference

SNMP Commands

mode

Usage Guide

N/A

Configuration

The following example specifies port 15000 to receive the SNMP packets.

ExamplesRuijie(config)# snmp-server udp-port 15000

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

1.19 snmp-server user
Use this command to configure a new user to an SNMP group. Use the no form of this command to
remove a user from an SNMP group.
snmp-server user username groupname { v1 | v2c | v3 [ encrypted ] [ auth { md5 | sha }auth-password ] [ priv des56 priv-password ] } [ access { [ ipv6 ipv6-aclname ] aclnum | aclname } ]no snmp-server user username groupname { v1 | v2c | v3 }Parameter
Description

Parameter

Descriptionusername

Name of the user on the host that connects to the agent.

groupnameName of the group to which the user belongs.

v1 | v2c | v3

Specifies the SNMP version. But only SNMPv3 supports the following
security parameters.
Specifies whether the password appears in cipher text.
In cipher text format, you need to enter continuous hexadecimal

encrypted

numeric characters. Note that the authentication password of MD5
has a length of 16 bytes, while that of SHA has a length of 20 bytes.
Two characters make a byte. The encrypted key can be used only by
the local SNMP engine on the switch.

authSpecifies which authentication level should be used.
Password string (no more than 32 characters) used by theauth-password

authentication protocol. The system will change the password to thecorresponding authentication key.

1-16

Command Reference

SNMP Commands
Encryption mode. des56 refers to 56-bit DES encryption protocol.

priv

priv-password: password string (no more than 32 characters) used forencryption. The system will change the password to thecorresponding encryption key.

md5

aclnumber
aclnameipv6-aclname

Defaults

N/A

Command

Global configuration mode.

Enables the MD5 authentication protocol. While the sha enables the
SHA authentication protocol.
Access list number, which specifies the IPv4 addresses that are
permitted to access the MIB.
Name of the access list, which specifies the IPv4 addresses that are
permitted to access the MIB.
Name of the IPv6 access list, which specifies the IPv6 addresses thatare permitted to access the MIB.

mode

Usage Guide

N/A

Configuration

The following example configures an SNMPv3 user with MD5 authentication and DES encryption:

ExamplesRuijie(config)# snmp-server user user-2 mib2user v3 auth md5 authpassstr priv
des56 despassstr

RelatedCommands

Platform

Command

Description

show snmp user

Displays the SNMP user configuration.

N/A

Description

1.20 snmp-server view
Use this command to configure an SNMP view. Use the no form of this command to remove an
SNMP view.
snmp-server view view-name oid-tree { include | exclude }no snmp-server view view-name [ oid-tree ]Parameter
Description

Parameter

Description

view-name

View nameoid-treeSpecifies the MIB object to associate with the view.

includeIncludes the sub trees of the MIB object in the view.

1-17

Command Reference
excludeSNMP Commands
Excludes the sub trees of the MIB object from the view.

Defaults

By default, a view is set to access all MIB objects.

Command

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example sets a view that includes all MIB-2 sub-trees (oid is 1.3.6.1).

ExamplesRuijie(config)# snmp-server view mib2 1.3.6.1 include

RelatedCommands

Platform

Command

Description

show snmp view

Displays the SNMP view configuration.

N/A

Description

1-18

Command Reference

RMON Commands(beta)

2 RMON Commands(beta)
2.1 rmon alarm
Use this command to monitor a MIB variable. Use the no form of this command to remove thealarm entry.
rmon alarm number variable interval {absolute | delta } rising-threshold value [event-number]falling-threshold value [event-number] [owner ownername]no rmon alarm number

Parameter

Parameter

Description

description

numberAlarm number. The value ranges from 1-65,535.
Alarm variable. The value is a character string consisting of 1 to 255

variablecharacters in OID dotted format (the format is entry.integer.instance or aleaf node named .instance, for example. 1.3.6.1.2.1.2.1.10.1).

intervalabsolutedelta

Sampling interval. The valye ranges from 1 to 2,147,483,647 in the unit ofsecond.
Absolute sampling. In this mode, when the sampling time arrives, thesystem directly invokes the variable value.
Delta sampling. In this mode, when the sampling time arrives, the system
invokes the delta value of the variable within the sampling interval.

rising-threshold

Rising threshold and the corresponding event number when the threshold isvaluereached. The threshold ranges from -2,147,483,648 to +2,147,483,647.

event-number

The event number ranges from 1 to 65,535.

falling-threshold

Falling threshold and the corresponding event number when the threshold isvaluereached. The threshold ranges from -2,147,483,648 to +2,147,483,647

owner

Owner of an entry. The value is a character string consisting of 1 to 63

ownernamecharacters that are case sensitive.

Default

N/A.

Command mode

Global configuration mode.

The RGOS allows you to modify the configured history information of the Ethernet network,
Usage guidelines

including variable, absolute/delta, owner, rising-threshold/falling-threshold, and thecorresponding events. However, the modification does not take effect immediately until thesystem triggers the monitoring event at the next time.

ExamplesThe example below monitors the MIB variable instance ifInNUcastPkts.6.
Ruijie(config)# rmon alarm 10 1.3.6.1.2.1.2.2.1.12.6 30 delta

2-1

Command Reference

RMON Commands(beta)rising-threshold 20 1 falling-threshold 10 1 owner zhangsan

Relatedcommands

Command

Description

rmon event number [log] [trap community]
description string [owner ownername]Adds an event definition.

2.2 rmon collection history
Use this command to enable history statistics on the Ethernet interface. Use the no form of thiscommand to remove the history entry.
rmon collection history index [owner ownername] [buckets bucket-number] [interval
seconds]
no rmon collection history index

Parameter

Parameter

Description

description

index

Index of a history entry. The value ranges from 1 to 65,535.

owner

Owner of an entry. The value is a character string consisting of 1 to 63

ownernamecharacters that are case sensitive.

buckets

Capacity of a history entry (that is, the maximum number of history entries).

bucket-number

The value ranges from 1 to 65,535. The default value is 10.

interval

Statistics period. The unit is second. The value ranges from 1 to 3,600. The

seconds

default value is 1,800 seconds.

Default

N/A.

Command mode

Interface configuration mode.

Usage guidelines

The configured history control entry parameters cannot be modified. And the history entry
cannot be removed from the interface where the entry configured.

The example below enables log statistics on interface GigabitEthernet 0/17.
Ruijie# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ExamplesRuijie(config)#interface gigabitEthernet 0/17
Ruijie(config-GigabitEthernet0/17)#rmon collection history 1 owner UserA
buckets 5 interval 60

Related commands

Command

Description

rmon collection stats index

Adds a statistical entry on the Ethernet[owner ownername]interface.

2-2

Command Reference

RMON Commands(beta)

2.3 rmon collection stats
Use this command to monitor an Ethernet interface. Use the no form of this command to
remove the configuration.
rmon collection stats index [owner ownername ]no rmon collection stats index

Parameter

Parameter

Description

description

index

Index of the statistic table. The value ranges from 1 to 65,535.
Owner of an entry. The value is a character string consisting of 1 to 63

owner ownername

characters that are case sensitive and do not contain spaces.

Default

N/A.

Command mode

Interface configuration mode.

Usage guidelines

The configured history control entry parameters cannot be modified. And the history entry
cannot be removed from the interface where the entry configured.

The example below enables monitoring the statistics of interface GigabitEthernet 0/17.
Ruijie# configure terminal
ExamplesEnter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#interface gigabitEthernet 0/17
Ruijie(config-GigabitEthernet0/17)# rmon collection stats 1 owner UserA

Relatedcommands

Command

Description

rmon collection history index [owner ownername][buckets bucket-number] [interval seconds]

Adds a history control entry.

2.4 rmon event
Use this command to define an event. Use the no form of this command to remove the event
entry.
rmon event number [ log ] [ trap community ] [ description-string ] [ description
description-string ] [ owner ownername ]no rmon event number

Parameter

Parameter

Description

description

numberEvent number. The value ranges from 1 to 65,535.

log(Optional) Log event. When a log event is triggered, the system records a
log.

2-3

Command Reference

trap community

RMON Commands(beta)(Optional) Trap event. When a trap event is triggered, the system sends
trap with the group named “community”.

description(Optional) Description of the event. The value is a character string

description-string

consisting of 1 to 127 characters.

owner(Optional) Owner of an entry. The value is a character string consisting of 1

ownernameto 63 characters that are case sensitive.

Default

N/A.

Command mode

Global configuration mode.

The RGOS allows you to modify the configured history information of the Ethernet network,
Usage guidelines

including variable, absolute/delta, owner, rising-threshold/falling-threshold, and thecorresponding events. However, the modification does not take effect immediately until thesystem triggers the monitoring event at the next time.

The example below defines the event actions: log event and send trap message.
Ruijie#configure terminal
ExamplesEnter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#rmon event 1 log trap public description "ifInNUcastPkts
is abnormal" owner UserA

Command

Description

Relatedrmon alarm number variable interval {absolute | delta }commands

rising-threshold value [event-number] falling-thresholdvalue [event-number] [owner ownername]

2.5 show rmon
Default

Use this command to display the RMON configuration.
show rmo

Default

N/A.

Command mode

Privileged EXEC mode.

Usage guidelines

N/A.

The example below displays the RMON configuration.
Ruijie#show rmon
Examplesether statistic table:
index = 1

2-4

Adds an alarm entry.

Command Reference

RMON Commands(beta)
interface = GigabitEthernet 0/17
owner = admin
status = 0
dropEvents = 61
octets = 170647461
pkts = 580375
broadcastPkts = 2135
multiPkts = 3615
crcAlignErrors = 0
underSizePkts = 0
overSizePkts = 0
fragments = 0
jabbers = 0
collisions = 0
packets64Octets = 3254668
packets65To127Octets = 1833370
packets128To255Octets = 2098146
packets256To511Octets = 126716
packets512To1023Octets = 363621
packets1024To1518Octets = 1077865

rmon history control table:
index = 1
interface = GigabitEthernet 0/17
bucketsRequested = 5
bucketsGranted = 5
interval = 60
owner = UserA
stats = 1
rmon history table:
index = 1
sampleIndex = 2485
intervalStart = 7d:22h:56m:38s
dropEvents = 0
octets = 5840
pkts = 27
broadcastPkts = 0
multiPkts = 0
crcAlignErrors = 0
underSizePkts = 0
overSizePkts = 0
fragments = 0
jabbers = 0

2-5

Command Reference

RMON Commands(beta)
collisions = 0
utilization = 0

rmon alarm table:
index: 1
interval: 60
oid = 1.3.6.1.2.1.2.2.1.12.6
sampleType: 2
alarmValue: 0
startupAlarm: 3
risingThreshold: 20
fallingThreshold: 10
risingEventIndex: 1
fallingEventIndex: 1
owner: UserA
status: 1
rmon event table:
index = 1
description = ifInNUcastPkts is abnormal
type = 4community = public
lastTimeSent = 0d:0h:0m:0s
owner =UserA
status = 1
rmon log table:
eventIndex = 1
index = 1
logTime = 6 d:19 h:21 m:48 s
logDescription = ifInNUcastPkts is abnormal

RelatedCommand

Descriptioncommands

N/A

N/A

2.6 show rmon alarm
Default

Use this command to display the RMON alarm table.
show rmon alarm

Default

N/A.

Command mode

Privileged EXEC mode.

2-6

Command Reference
Usage guidelines

RMON Commands(beta)

N/A.

The example below displays the RMON alarm table.
Ruijie#show rmon alarmrmon alarm table:
index: 1
interval: 60
oid = 1.3.6.1.2.1.2.2.1.12.6
sampleType: 2
alarmValue: 0

ExamplesstartupAlarm: 3
risingThreshold: 20
fallingThreshold: 10
risingEventIndex: 1
fallingEventIndex: 1
owner: UserA
status: 1

Command

Description

rmon alarm number variable
Relatedcommands

interval {absolute | delta }rising-threshold value[event-number] falling-threshold value

Adds an alarm entry.

[event-number] [owner
ownername]

2.7 show rmon event
Use this command to display the event configuration.
show rmon event

Default

N/A.

Command mode

Privileged EXEC mode.

Usage guidelines

N/A.

The example below displays the event configuration.
Ruijie#show rmon eventrmon event table:
Examplesindex = 1
description = ifInNUcastPkts is abnormal
type = 4

2-7

Command Reference

RMON Commands(beta)
community = public
lastTimeSent = 0d:0h:0m:0s
owner =UserA
status = 1

rmon log table:
eventIndex = 1
index = 1
logTime = 6d:19h:21m:48s
logDescription = ifInNUcastPkts is abnormal

Relatedcommands

Command

Description

rmon event number [log] [trap community] [description
description-string] [owner ownername]Adds an event entry.

2.8 show rmon history
Use this command to display the history information.
show rmon history

Default

N/A.

Command mode

Privileged EXEC mode.

Usage guidelines

N/A.

The example below displays the history information.
Ruijie#show rmon history
rmon history control table:
index = 1
interface = GigabitEthernet 0/17
bucketsRequested = 5
bucketsGranted = 5
interval = 60
Examplesowner = UserA
stats = 1
rmon history table:
index = 1
sampleIndex = 2485
intervalStart = 7d:22h:56m:38s
dropEvents = 0
octets = 5840

2-8

Command Reference

RMON Commands(beta)
pkts = 27
broadcastPkts = 0
multiPkts = 0
crcAlignErrors = 0
underSizePkts = 0
overSizePkts = 0
fragments = 0
jabbers = 0
collisions = 0
utilization = 0

CommandRelatedcommands

Description

rmon collection history index[owner ownername] [buckets

Adds a history control entry.

bucket-number] [interval
seconds]

2.9 show rmon statistics
Use this command to display the RMON statistics.
show rmon statistics
Default

N/A.

Command mode

Privileged EXEC mode.

Usage guidelines

N/A.

The example below displays the RMON statistics.
Ruijie#show rmon statistics
ether statistic table:
index = 1
interface = GigabitEthernet 0/17
owner = admin
status = 0
ExamplesdropEvents = 61
octets = 170647461
pkts = 580375
broadcastPkts = 2135
multiPkts = 3615
crcAlignErrors = 0
underSizePkts = 0
overSizePkts = 0

2-9

Command Reference

RMON Commands(beta)
fragments = 0
jabbers = 0
collisions = 0
packets64Octets = 3254668
packets65To127Octets = 1833370
packets128To255Octets = 2098146
packets256To511Octets = 126716
packets512To1023Octets = 363621
packets1024To1518Octets = 1077865

RelatedCommand

Descriptioncommands

rmon collection stats index [owner ownerstring]

Adds a statistical entry.

2-10Command Reference

NTP Commands

3 NTP Commands
3.1 no ntp
Use this command to disable Network Time Protocol (NTP), and clear all NTP configuration.
no ntpParameter
Description

Parameter

Description

N/A

N/A

Defaults

NTP is disabled by default.

Command

Global configuration mode.

mode

Usage Guide

By default, NTP is disabled. However, once the NTP server or the NTP authentication is configured,
the NTP service will be enabled.

Configuration

The following example disables NTP.

ExamplesRuijie(config)#no ntp

RelatedCommands

Platform

Command

Description

ntp server

Specifies an NTP server.

N/A

Description

3.2 ntp access-group
Use this command to configure an access group to control NTP access. Use the no form of thiscommand to remove the peer access group.
ntp access-group { peer | serve | serve-only | query-only } access-list-number | access-list-nameno ntp access-group { peer | serve | serve-only | query-only } access-list-number |access-list-nameParameter
Description

Parameter

Description
Allows the device to receive time requests and NTP control queries topeer

synchronize itself to the servers specified in the access list.

3-1

Command Reference

NTP Commands
Allows the device to receive time requests and NTP control queries

servefrom the servers specified in the access list but not to synchronize
itself to the specified servers.

serve-only

query-only

Defaults

Allows the device to receive only time requests from the servers
specified in the access list.
Allows the device to receive only NTP control queries from servers
specified in the access list.

access-list-number

Access control list number, ranging from 1 to 99 and 1300 to 1999.

access-list-name

Access control list name.

No access rule to control NTP access is configured by default, namely, NTP access is granted to all
devices.

Command

Global configuration mode.

mode

Usage Guide

Use this command to configure an access group to control NTP access, providing a minimal security
measures (more secure way is to use the NTP authentication mechanism).
The NTP service enables the access group options to be scanned in the following order, from least
restrictive to most restrictive: peer, serve, serve-only, query-only.
If you do not configure any access groups, NTP access is granted to all devices. However, once you
configure the access rule, NTP access is granted only to the devices specified in the access list.

NTP control query is not supported in the current system. Although it matches with the order inaccordance with the above rules, the related requests about the control and query are notsupported.

Configuration

The following example shows how to allow the device to only receive time requests from the device of

Examples

192.168.1.1.
Ruijie(config)# access-list 1 permit host 192.168.1.1
Ruijie(config)# ntp access-group serve-only 1

RelatedCommands

Platform

Command

Description

ip access-list

Creates an IP access control list.

N/A

Description

3.3 ntp authenticate
Use this command to enable NTP authentication. Use the no form of this command to disable NTP

3-2

Command Reference

NTP Commands

authentication.
ntp authenticate
no ntp authenticate

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

Disabled.

Command

Global configuration mode.

mode

Usage Guide

If NTP authentication is disabled, the synchronization communication is not encrypted. To enableencrypted communication on the server, enable the NTP authentication and configure other keys
globally.
NTP authentication is implemented through the trusted key specified by the ntp authentication-key
and ntp trusted-key commands.

Configuration

After an authentication key is configured and specified as the global trusted key, enable NTP

Examplesauthentication.
Ruijie(config)#ntp authentication-key 6 md5 wooooop
Ruijie(config)#ntp trusted-key 6
Ruijie(config)#ntp authenticate

RelatedCommands

Platform

Command

Description

ntp authentication-key

Sets the global authentication key.

ntp trusted-key

Configures the global trusted key.

N/A

Description

3.4 ntp authentication-key
Use this command to configure an NTP authentication key. Use the no form of this command to
remove the NTP authentication key.
ntp authentication-key key-id md5 key-string [enc-type]
no ntp authentication-key key-id

Parameter
Description

Parameter

Description

key-idKey ID, ranging from 1 to 4294967295.

key-string

Key string

3-3Command Reference
enc-type

NTP Commands(Optional) Whether this key is encrypted, where, 0 indicates the key is
not encrypted, 7 indicates the key is encrypted simply. The key is notencrypted by default.

Defaults

NTP authentication key is not configured by default.

Command

Global configuration mode.

mode

Usage Guide

Use this command to configure an NTP authentication key and enables the md5 algorithm forauthentication. Each key presents a unique key ID, which can be configured as a trusted key using
the ntp trusted-key command.
You can configure up to 1024 NTP authentication keys. However, each server can support only one
key.

Configuration

The following example configures an NTP authentication key.

ExamplesRuijie(config)ntp authentication-key 6 md5 wooooop

RelatedCommands

Platform

Command

Description

ntp authenticate

Enables NTP authentication.

ntp trusted-key

Configures an NTP trusted key.

ntp server

Specifies an NTP server.

N/A

Description

3.5 ntp disable
Use this command to disable the device to receive NTP packets on the specified interface.
ntp disable

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

All NTP packets can be received by default.

Command

Interface configuration mode.

mode

Usage Guide

The NTP message received on any interface can be provided to the client to carry out the clock
adjustment. The function can be set to shield the NTP message received from the corresponding
interface.

3-4

Command Reference

NTP Commands

By default, the device receives NTP packets on all interfaces, and adjust clock for the client. You can
use this command to disable the device to receive NTP packets on the specified interface.
This command is configured only the interface that can receive and send IP packets.

Configuration

The following example disables the device to receive the NTP packets.

ExamplesRuijie(config-if-GigabitEthernet 0/17)#no ntp disable

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3.6 ntp master
Use this command to configure the device to act as an authoritative NTP server, synchronizing timeto other devices. Use the no form of this command to remove the device as an authoritative NTP
server.
ntp master [ stratum ]no ntp masterParameter
Description

Parameter

Description

stratum

Stratum level. The range is from 1 to 15. The default is 8.

Defaults

N/A

Command

Global configuration mode.

mode

Usage Guide

In general, the local device synchronizes time from the external time source directly or indirectly.
However, if the time synchronization fails due to network connection trouble, you can use thiscommand to configure the local device to act as an authoritative NTP server to synchronize time to tother devices. Once configured, the device will not perform time synchronization with the time source
which is of a higher stratum.
Configuring the device to act as an authoritative NTP server (in particular, specify a lower
stratum level), may be likely to overwrite the effective time. If multiple devices in the same
network are configured with this command, the time synchronization may be instable due to thetime difference between the devices.
Before configuring this command, you need to manually correct the system clock to avoid too
much bias if the device has never performed time synchronization with the external clock

3-5

Command Reference

NTP Commands

source.

Configuration

The following example configures the device to act as an authoritative NTP server, and sets the

Examplesstratum level to 12:
Ruijie(config)# ntp master 12

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3.7 ntp server
Use this command to specify a NTP server for the NTP client. Use the no form of this command todelete the specified NTP server.
ntp server { ip-addr | domain | ip domain | ipv6 domain } [ version version ] [ source interface-id ][ key keyid ] [ prefer ]no ntp server ip-addr

Parameter
Description

Parameter

ip-addrDescription
Sets the IP address of the NTP server. The address can be in IPv4 or
IPv6 format.

domainSets the domain name of the NTP server, supporting IPv4 and IPv6.

version(Optional) Specifies the NTP version (1-3). The default is NTPv3.

interface-id(Optional) Specifies the source interface from which the NTP
message is sent (L3 interface).
(Optional) Specifies the encryption key adopted when communication

keyid

with the corresponding server. The key ID range is from 1 to
4,294,967,295.

prefer(Optional) Specifies the given NTP server as the preferred one.

Defaults

No NTP server is configured by default.

Command

Global configuration mode.

mode

Usage Guide

At present, RGOS system only supports clients other than servers. Up to 20 servers can besynchronized.
To carry out the encrypted communication with the server, set the global encryption key and global
trusted key firstly, and then specify the corresponding key as the trusted key of the server to launch

3-6

Command Reference

NTP Commands

the encrypted communication of the server. It requires the server presents identical global encryption
key and global trust key to complete the encrypted communication with the server.
In the same condition (for instance, precision), the prefer clock is used for synchronization.
The source interface of NTP packets must be configured with the IP address and can becommunicated with the peer.

Configuration

The following example configures an NTP server.

ExamplesFor IPv4: Ruijie(config)# ntp server 192.168.210.222
For IPv6: Ruijie(config)# ntp server 10::2

RelatedCommands

Platform

Command

Description

no ntpDisables NTP.

N/A

Description

3.8 ntp trusted-key
Use this command to set a global trusted key. Use the no form of this command to remove the global
trusted key.
ntp trusted-key key-id
no ntp trusted-key key-id

Parameter
Description

Parameter

Description

key-idGlobal trusted key ID, ranging from 1 to 4294967295.

Defaults

N/A

Command

Global configuration mode.

mode

Usage Guide

The NTP communication parties must use the same trusted key. The key is identified by ID and is nottransmitted to improve security.

Configuration

The following example configures an authentication key and sets it as a trusted key.

ExamplesRuijie(config)#ntp authentication-key 6 md5 wooooop
Ruijie(config)#ntp trusted-key 6
Ruijie(config)#ntp server 192.168.210.222 key 6

RelatedCommands

Command

Description

3-7

Command Reference

Platform

NTP Commands

ntp authenticate

Enables NTP authentication.

ntp authentication-key

Configures an NTP authentication key.

ntp server

Configures an NTP server.

N/A

Description

3.9 ntp update-calendar
Use this command to enable the NTP client to periodically update the device clock with the timesynchronized from the external source clock. Use the no form of this command to remove thisfunction.
ntp update-calendar
no ntp update-calendar

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

By default, update the calendar periodically is not configured.

Command

Global configuration mode.

mode

Usage Guide

By default, the NTP update-calendar is not configured. After configuration, the NTP client updates thecalendar at the same time when the time synchronization of external time source is successful. It is
recommended to enable this function for keeping the accurate calendar.

Configuration

The following example configures the NTP update calendar periodically.

ExamplesRuijie(config)# ntp update-calendar

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3.10 show ntp server
Use this command to display the NTP server configuration.
show ntp server

3-8Command Reference
Parameter
Description

NTP Commands

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode, VLAN configuration

mode

mode

Usage Guide

N/A

Configuration

The following example displays the NTP server.

ExamplesRuijie# show ntp server
ntp-server

sourcekeyid

prefer version---------------------------------------- -------- -----------------------10::2

None

192.168.210.222

RelatedCommands

Platform

None

None
None

Command

Description

N/A

N/A

FALSE
FALSE

3
3

N/A

Description

3.11 show ntp status
Use this command to display the NTP configuration.
show ntp status

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode, VLAN configuration

mode

mode

Usage Guide

Use this command to display the NTP configuration. No configuration is displayed before thesynchronization server is configured for the first time.

3-9Command Reference

NTP Commands

Configuration

The following example displays the NTP configuration.

ExamplesRuijie# show ntp status
Clock is synchronized, stratum 8, reference is 127.127.1.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**24reference time is D4BD819B.433892EE (01:27:55.000 UTC )clock offset is 0.00000 sec, root delay is 0.00000 sec
root dispersion is 0.00002 msec, peer dispersion is 0.00002 msec

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3-10

Command Reference

SNTP Commands(beta)

4 SNTP Commands(beta)
4.1 show sntp
Use this command to display the SNTP configuration.
show sntp

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

CommandPrivileged EXEC mode, global configuration mode, interface configuration mode.

mode

Usage Guide

N/A

Configuration

The following example displays the SNTP configuration.

ExamplesRuijie# show sntp

RelatedCommands

Platform

SNTP state: Enable

SNTP server: 192.168.4.12

SNTP sync interval: 60Time zone: +8

Command

Description

sntp enable

Enables SNTP.

N/A

Description

4.2 sntp enable
Use this command to enable the SNTP function. Use the no form of this command to restore thedefault value.
sntp enable
no sntp enable

Parameter
Description

Parameter

Description

N/A

N/A

4-1

Command Reference

SNTP Commands(beta)

Defaults

SNTP is disabled by default.

Command

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example enables SNTP.

ExamplesRuijie(config)# sntp enable

RelatedCommands

Platform

Command

Description

show sntp

Displays the SNTP configuration.

N/A

Description

4.3 sntp interval
Use this command to set the interval for the SNTP client to synchronize its clock with the NTP/SNTP
server. Use the no form of this command to restore the default synchronization interval.
sntp interval seconds
no sntp intervalParameter
Description

Parameter

Description

seconds

Synchronization interval. The unit is second, and the range is from 60 to 65,535.

Defaults

The default synchronization interval is 1,800 seconds.

Command

Global configuration mode.

mode

Usage Guide

To make the synchronization interval configuration effective, run the sntp enable command.

Configuration

The following example configures the synchronization interval to 3,600 seconds.

ExamplesRuijie(config)# sntp interval 3600

RelatedCommands

Command

Description

sntp enable

Enables SNTP.

show sntp

Displays the SNTP configuration.

4-2

Command Reference
Platform

SNTP Commands(beta)

N/A

Description

4.4 sntp server
Use this command to specify an SNTP server. Use the no form of this command to remove the SNTP
server.
sntp server { ip-address | domain } [ source source-ip-address ]no sntp server

Parameter
Description

Parameter

Description

ip-address

IP address of the SNTP server.

domainSpecifies the domain name of the SNTP server.

source-ip-address(Optional) Indicates the specified source IP address.

Defaults

No SNTP server is configured by default.

Command

Global configuration mode.

mode

Usage Guide

As SNTP is fully compatible with NTP, the SNTP server can be used as an NTP server in Internet.

Configuration

The following example specifies an SNTP server in Internet.

ExamplesRuijie(config)# sntp server 192.168.4.12

RelatedCommands

Platform

Command

Description

show sntp

Displays the SNTP configuration.

sntp enable

Enables SNTP.

N/A

Description

4-3

Command Reference

SPAN Commands

5 SPAN Commands
5.1 monitor session
Use this command to configure the SPAN session and specify the source port (monitored port).
monitor session session-num source interface interface-id [ both | rx | tx ]Use this command to configure the SPAN session and specify the destination port (monitoring port).
monitor session session-num destination interface interface-id [ switch ]Use this command to remove the specified SPAN session, or remove the source port or destination
port of the specified SPAN session.
no monitor session session-num [ source interface interface-id | destination interface
interface-id ]Use this command to remove the specified SPAN session, or remove the source port or destination
port of the SPAN session.
default monitor session session-num { source interface interface-id | destination interface
interface-id }Parameter
Description

Parameter

Description

session-num

SPAN session number

interface-id

Interface namerx

Monitors the only received traffic.

tx

Monitors the only transmitted traffic.

bothMonitors both received and transmitted traffic. This is the default.

switchEnables switching on the destination port. Switching function isdisabled by default.

Defaults

Port monitoring is disabled by default.

Command

Global configuration mode.

mode

Usage Guide

Use this command to configure SPAN or remote SPAN, and specify the source port or destination
port.
If the both, rx or tx is not specified for the source port, the both parameter is the default.
Configuring an access list for the source port indicates that only the traffic permitted by the access list
is monitored.
The switch feature is disabled on the destination port.

5-1Command Reference

SPAN Commands

Configuration

The following example configures the source port and destination port of the SPAN session.

ExamplesRuijie(config)# monitor session 1 source interface gigabitEthernet 0/17
Ruijie(config)# monitor session 1 destination interface gigabitEthernet 0/18

The following example removes the SPAN session.
Ruijie(config)# no monitor session 1

The following example removes the source port and destination port of the SPAN session.
Ruijie(config)# no monitor session 1 source interface gigabitEthernet 0/17
Ruijie(config)# no monitor session 1 destination interface gigabitEthernet
0/18

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

5.2 show monitor
Use this command to display the SPAN configurations.
show monitor [ session session-num ]Parameter
Description

Parameter

Description

session-num

Displays the specified SPAN session.

Defaults

N/A

CommandPrivileged EXEC mode, global configuration mode and interface configuration mode

mode

Usage Guide

N/A

Configuration

This following example displays all SPAN sessions.

ExamplesRuijie(config)#show monitor
sess-num: 1
span-type: LOCAL_SPAN
src-intf:
GigabitEthernet 0/17

frame-type Bothdest-intf:

5-2

Command Reference

SPAN Commands

GigabitEthernet 0/18

The following example displays SPAN session 1.
Ruijie#show monitor session 1
sess-num: 1
span-type: LOCAL_SPAN
src-intf:
GigabitEthernet 0/17

frame-type Bothdest-intf:
GigabitEthernet 0/18

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

5-3Reliability Configuration Commands
1. REUP Commands(beta)
2. RLDP Commands
3. IP Event Dampening Commands(beta)

1Command Reference

REUP Commands(beta)

1 REUP Commands(beta)
1.1 link state group
Use this command to add the port into the specified link state track group. The no form of thiscommand is used to delete a port from the specified link state track group.
link state group num { upstream | downstream }no link state group

Parameter
Description

Parameter

Descriptionnum

ID of the link state track group.

upstream

downstream

Configures the port to be an upstream port in the link state trackgroup.
Configures the port to be a downstream port in the link state trackgroup.

Defaults

The port is not added into any link state track group.

Command

Interface configuration mode.

Mode

Usage Guide

First create a link state track group and then add a port into the specified link state track group.

Configuration

The following example shows how to add the port GigabitEthernet 0/17 into the link state track group:

ExamplesRuijie(config)# link state track 1
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# link state group 1 upstream

RelatedCommands

Platform

Command

Description

link state track

Enables a link state track group.

N/A.

Description

1.2 link state track
Use this command to enable the link state track group. The no form of this command is used todisable a link state track grouplink state track [ num [ up-delay delay-time ] ]1-1

Command Reference

REUP Commands(beta)

no link state track [ num ]Parameter
Description

Parameter

Description

numInterface ID of the link aggregation group.

up-delay delay-time

Defaults

N/A.

Command

Global configuration mode.

Downlink delay for link tracking in seconds. The value ranges from 0
to 300. The default value is 0.

Mode

Usage Guide

First create a link state track group and then add a port into the specified link state track group.

Configuration

The following example shows how to create a link state track group:

ExamplesRuijie(config)# link state track 1

RelatedCommands

Command

Description
Adds the port to the specified link state tracklink state group

Platformgroup.

N/A.

Description

1.3 mac-address-table move update max-update-rate
Use this command to configure the maximum number of MAC address update packets sent per
second.
mac-address-table move update max-update-rate pkts-per-second
no mac-address-table move update max-update-rate

Parameter
Description

Parameterpkts-per-second

Description
The maximum number of MAC address update packets sent per
second. It ranges from 0 to 32000, and the default value is 150.

Defaults

A maximum of 150 MAC address update packets are sent per second.

Command

Global configuration mode.

Mode

Usage Guide

When a link is switched, REUP sends a certain number of MAC address update packets to an uplink

1-2Command Reference

REUP Commands(beta)

device in every second to recover downlink data transmission of the uplink device.

Configuration

The following example shows how to configure the maximum number of MAC address update

Examplespackets sent per second:Ruijie(config)# mac-address-table move update max-update-rate 20

RelatedCommands

Platform

Command

Description

N/A.

N/A.

N/A.

Description

1.4 mac-address-table move update receive
Use this command to enable REUP to receive the mac-address-table update messages.
mac-address-table move update receive
no mac-address-table move update receive

Parameter
Description

Parameter

Description

N/A.

N/A.

Defaults

Disabled.

Command

Global configuration mode.

Mode

Usage Guide

The dual link backup switchover will lead to the loss of downstream data flow, for the MAC address
for the uplink switch has not been updated in time. Therefore, it is necessary to update the MAC
address table of the uplink switch, to reduce the loss of L2 data flow. You need to enable the switch ofreceiving the MAC address update messages on the uplink switch.

Configuration

Ruijie(config)# mac-address-table move update receive

ExamplesRelatedCommands

Command

Description

mac-address-table move update transit

Platform

N/A.

Description

1-3

Enables REUP to transmit the
mac-address-table update messages.

Command Reference

REUP Commands(beta)

1.5 mac-address-table move update receive vlan
Use this command to configure the VLANs processing MAC address update packets.
mac-address-table move update receive vlan vlan-range
no mac-address-table move update receive vlan vlan-range

Parameter
Description

Parameter

Description

vlan-range

Range of the VLANs processing MAC address update packets.

Defaults

All VLANs process MAC address update packets.

Command

Global configuration mode.

Mode

Usage Guide

This command can be used to disable some VLANs from processing MAC address update packets.
VLANs disabled from processing MAC address update packets can still recover downlink datatransmission of the uplink device using MAC address update packets, but the capability to provide
convergence on link failure will be degraded.

Configuration

The following example configures VLANs processing MAC address update packets:

ExamplesRuijie(config)# no mac-address-table move update receive vlan 20

RelatedCommands

Command

Description

mac-address-table move update receive

Platform

Enables REUP to receive MAC address update
packets.

N/A.

Description

1.6 mac-address-table move update transit
Use this command to enable REUP to transmit the mac-address-table update messages.
mac-address-table move update transit
no mac-address-table move update transit

Parameter
Description

Defaults

Parameter

Description

N/A.

N/A.

Disabled.

1-4

Command Reference

Command

REUP Commands(beta)

Global configuration mode.

Mode

Usage Guide

In order to reduce the link switchover and the loss of the downstream data flow, it is necessary toenable the switch of receiving the MAC address update messages on the uplink switch.

Configuration

Ruijie(config)# mac-address-table move update transit

ExamplesRelatedCommands

Command

Description

mac-address-table move update transit vlan

Platform

Enables REUP to transmit the
mac-address-table update messages.

N/A.

Description

1.7 mac-address-table move update transit vlan
Use this command to enable REUP to transmit the mac-address update messages.
mac-address-table move update transit vlan vid
no mac-address-table move update transit vlan

Parameter
Description

Parameter

Descriptionvid

ID of the VLAN transmitting MAC address update packets.

Defaults

Transmit the MAC-address update messages in the default VLAN on the port.

Command

Interface configuration mode.

Mode

Usage Guide

When a link is switched, the VLAN enabled to transmit MAC address update packets will send MAC
address update packets to its uplink device.

Configuration

The following example configures VLANs transmitting MAC address update packets:

ExamplesRuijie(config)# mac-address-table move update transit

RelatedCommands

Command

Description

mac-address-table move update transit

Platform

N/A.

1-5

Enables REUP to receive themac-address-table update messages.

Command Reference

REUP Commands(beta)

Description

1.8 mac-address-table update group
Use this command to set the mac-address-table update group.
mac-address-table update group [ group-num ]no mac-address-table update group

Parameter
Description

Parameter

Description

group-num

The mac-address-table update group ID.

Defaults

By default, no mac-address-table update group is configured.

Command

Interface configuration mode.

Mode

Usage Guide

In order to reduce the flood due to the MAC address update and the influence on the normal datatransmission of the switch, Ruijie products add a configuration of MAC address update group. Only if
all the interfaces are added to a MAC address update group, the downstream data transmission berestored rapidly.

Configuration

Ruijie(config-if-GigabitEthernet 0/17)# mac-address-table update group 2

ExamplesRelatedCommands

Command

Description

show mac-address-table update group detail

Platform

Displays the mac-address-table update group
information.

N/A.

Description

1.9 show interfaces switchport backup
Use this command to display the dual link backup information on the interfaces.
show interfaces [ interface-id ] switchport backup [ detail ]Parameter
Description

Parameter

Description

interface-id

The interface id of the dual link backup.

detailDisplays the detailed information about the dual link backup.

1-6Command Reference

REUP Commands(beta)

Defaults

Show the dual link backup information on all interfaces.

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A.

Configuration

Ruijie # show interfaces switchport backup detail

ExamplesSwitch Backup Interface Pairs:
Active Interface

Backup InterfaceState---------------------------------------------------Gi0/17

Gi0/18

Active Up/Backup Standby

Interface Pair : Gi0/17, Gi0/18
Preemption Mode : Off
Preemption Delay : 35 seconds
Bandwidth : Gi0/17(1000 Mbits), Gi0/18(1000 Mbits)

RelatedCommands

Platform

Command

Description

N/A.

N/A.

N/A.

Description

1.10 show link state group
Use this command to display the information of a link state track group.
show link state group

Parameter
Description

Parameter

Description

N/A.

N/A.

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A.

Configuration

The following example displays the link state track group:

ExamplesRuijie(config)#show interfaces switchport backup detail
Ruijie(config)#show link state group1-7

Command Reference

REUP Commands(beta)

Link State Group:1 Status: Enabled, Down
Up-delay (default 0s): 0(s)Upstream Interfaces :Gi0/17(Down)
Downstream Interfaces :Link State Group:2 Status: Disabled, Down
Up-delay (default 0s): 0(s)Upstream Interfaces :Downstream Interfaces :(Up):Interface up

RelatedCommands

Platform(Down):Interface Down

(Dis):Interface disabled

Command

Description

N/A.

N/A.

N/A.

Description

1.11 show mac-address-table move update
Use this command to display the statistics about the MAC address updates tranceived on theinterface.
show mac-address-table move update

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A.

Configuration

Ruijie(config)#show mac-address-table move update

ExamplesMac address table move update status:
Transit:enable
Receive:enable
Max-update-rate:20
Receive vlan:1-19,21-4094

1-8

Command Reference

RelatedCommands

Platform

REUP Commands(beta)

Command

Description

N/A.

N/A.

N/A.

Description

1.12 show mac-address-table update group
Use this command to display the mac-address-table update group information.
show mac-address-table update group [ detail ]Parameter
Description

Parameter

Description

detailDisplays the detailed information about the mac-address-table update
group.

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A.

Configuration

Ruijie # configure terminal

ExamplesRuijie (config)# mac-address-table move update receive
Ruijie (config)# interface range gigabitEthernet 0/17-18
Ruijie (config-if-range)# mac-address-table update group
Ruijie (config-if-range)# end
Ruijie # show mac-address-table update group detailMac-address-table Update Group:1
Received mac-address-table update message count:7
Group member Receive Count Last Receive Switch-ID Receive Time----------------------------------------------------------

RelatedCommands

Platform

GigabitEthernet 0/17 00000.0000.0000

GigabitEthernet 0/18 00000.0000.0000

Command

Description

N/A.

N/A.

N/A.

Description

1-9Command Reference

REUP Commands(beta)

1.13 switchport backup interface
Use this command to configure the REUP dual link backup interface.
switchport backup interface interface-id
no switchport backup

Parameter
Description

Parameter

Description

interface-id

Interface ID of the backup link.

Defaults

N/A.

Command

Interface configuration mode.

Mode

Usage Guide

Enter the primary interface configuration mode, the interface-id in the parameter is for the backup
interface. When the active link fails, the backup link transmission is restored rapidly

Configuration

The following example shows how to set the dual link backup, with GigabitEthernet 0/17 andExamplesGigabitEthernet 0/18 as primary interface and backup interface:
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# switchport backup interface
gigabitethernet 0/18

RelatedCommands

Command

Description
Displays the dual link backup configuration onshow interface switchport backup

Platformthe switch.

N/A.

Description

1.14 switchport backup interface preemption
Use this command to configure the REUP link preemption function.
switchport backup interface interface-id preemption mode { forced | bandwidth | off }switchport backup interface interface-id preemption delay delay-time
no switchport backup interface interface-id preemption delay
no switchport backup interface interface-id preemption mode

Parameter
Description

Parameter

Description

interface-id

The interface id of the backup link.

1-10Command Reference

delay-time

REUP Commands(beta)

The preemption delay time.

Defaults

The default preemption delay time is 35s.

Command

Interface configuration mode.

Mode

Usage Guide

The preemption mode includes forced, bandwidth and off. In the bandwidth preemption mode, theinterface with high bandwidth has priority over other interfaces to transmit the data. In the forced
preemption mode, the primary has priority over backup interfaces to transmit the data. No preemption
event occurs in the off preemption mode. By default, the preemption mode is off.
The preemption delay refers to the delay time of the link switchover after the restoration of the link
failure.

Configuration

The following example shows how to set the dual link backup, with GigabitEthernet 0/17 andExamplesGigabitEthernet 0/18 as the primary interface and backup interface, set the bandwidth preemption
mode and 40s preemption delay:
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(GigabitEthernet 0/17)# switchport backup interface gigabitethernet
0/18 preemption mode bandwidth
Ruijie(GigabitEthernet 0/17)# switchport backup interface gigabitethernet
0/18 preemption delay 40

RelatedCommands

Platform

Command

Description

show interface switchport backup

Displays the dual link backup configuration.

N/A.

Description

1.15 switchport backup interface prefer
Use this command to configure VLAN load balancing on a link. The no form of this command is used
to delete the configured VLAN load strategy.
switchport backup interface interface-id prefer instance instance-range
no switchport backup interface interface-id prefer

Parameter
Description

Defaults

Parameter

Description

interface-id

Interface ID of the backup link.

instance-range

Instance range of loading on the backup interface.

No VLAN load on the backup interface.

1-11

Command Reference

Command

REUP Commands(beta)

Interface configuration mode.

Mode

Usage Guide

MSTP instance mapping can be used to modify the mapping between an instance and a VLAN.

Configuration

The following example configures VLAN load balancing on dual links.

ExamplesRuijie(GigabitEthernet 0/17)# switchport backup interface gigabitEthernet
0/18 prefer instance 1

RelatedCommands

Command

Description
Displays the configuration of dual-link backup

show interface switchport backup

on the switch.
Configures MSTP instances.

spanning-tree mst configuration

Platform

N/A.

Description

1-12

Command Reference

RLDP Commands

2 RLDP Commands
2.1 rldp detect-interval
Use this command to configure the interval at which the RLDP sends the detection message on theport. Use the no form of this command to restore the default value.
rldp detect-interval interval
no rldp detect-intervalParameter
Description

Parameter

Description

interval

Detection interval in the range 2 to 15 seconds

Defaults

3 seconds.

Command

Global configuration mode.

Mode

Usage Guide

In the environment where STP is enabled, it is recommended that the product of interval multiplying
the maximum number of detections is less than the topology convergence time of STP.

Configuration

The following example shows how to set the detection interval as 5s:

ExamplesRuijie(config)# rldp detect-interval 5

RelatedCommands

Platform

Command

Description

rldp detect-max

Sets the maximum number of detections.

N/A.

Description

2.2 rldp detect-max
Use this command to set the maximum number of sending detection packets on the port. If theneighboring port does not respond when this detection number is exceeded, the link is consideredfaulty. Use the no form of this command to restore it to the default value.
rldp detect-max num
no rldp detect-max

Parameter
Description

Parameter

Description

2-1

Command ReferencenumDefaults

2.

Command

Global configuration mode.

RLDP Commands

Maximum number of detections in the range 2 to 10

Mode

Usage Guide

This command is used together with the detection interval to specify the maximum number ofdetections.

Configuration

The following example shows how to set the maximum number of detections as 5:

ExamplesRuijie(config)# rldp detect-max 5

RelatedCommands

Platform

Command

Description

rldp detect-interval

Sets the detection interval.

N/A.

Description

2.3 rldp enable
Use this command to enable RLDP globally. Use the no form of this command to disable the function.
rldp enable
no rldp enable

Parameter
Description

Parameter

Description

N/A.

N/A.

Defaults

Disabled.

Command

Global configuration mode.

Mode

Usage Guide

You can enable RLDP on the interface only when the global RLDP is enabled.

Configuration

The following example shows how to enable RLDP:

ExamplesRuijie(config)# rldp enable

RelatedCommands

Command

Description

rldp port

Enables the RLDP function on the port.

2-2Command Reference

Platform

RLDP Commands

N/A.

Description

2.4 rldp neighbor-negotiation
Use this command to enable RLDP neighbor negotiation. Use the no form or default form of thiscommand to restore the default setting.
rldp neighbor-negotiation
no rldp neighbor-negotiation
default rldp neighbor-negotiation

Parameter
Description

Parameter

Description

N/A.

N/A.

Defaults

RLDP neighbor negotiation is disabled by default.

Command

Global configuration mode.

Mode

Usage Guide

With neighbor negotiation enabled, RLDP unidirectional-/bidirectional-link detection starts only after
the neighbor negotiation is successful. (Receiving the Prob message from the neighbor indicates theneighbor negotiation is successful.)

Configuration

The following example shows how to enable RLDP neighbor negotiation:

ExamplesRuijie#config
Ruijie(config)#rldp neighbor-negotiation

RelatedCommands

Platform

Command

Description

rldp port

Enables the RLDP function on the port.

N/A.

Description

2.5 rldp port
Use this command to enable RLDP on the port and specify detection type and troubleshooting
method. Use the no form of this command to disable the function.
rldp port { unidirection-detect | bidirection-detect | loop-detect } { warning | shutdown-svi |shutdown-port | block }no rldp port { unidirection-detect | bidirection-detect | loop-detect }2-3Command Reference

Parameter
Description

RLDP Commands

Parameter

Description

unidirection-detect

Sets unidirectional link detection.

bidirection-detect

Sets bidirectional link detection.

loop-detect

Sets loop detection type.

warning

Warns the user.

shutdown-svi

Shutdowns the SVI the port belongs to.

shutdown-port

Shutdowns the port.

block

Indicates the failure treatment is disabling learning and forwarding ofa port.

Defaults

N/A

Command

Interface configuration mode.

Mode

Usage Guide

The RLDP detection on the port takes effect only when the global RLDP is enabled.

Configuration

The following example shows how to configure RLDP detection on GigabitEthernet 0/17, specify the

Examplesdetection type as loop detection, and troubleshooting method as block.
Ruijie(config)# interface gigabitethernet 0/17
Ruijie(config-if-GigabitEthernet 0/17)# rldp port loop-detect block

RelatedCommands

Platform

Command

Description

rldp enable

Enables RLDP globally.

N/A.

Description

2.6 rldp reset
Use this command to make all the ports that have been handled using rldp shutdown or disable toperform RLDP detection again.
rldp reset

Parameter
Description

Parameter

Description

N/A.

N/A.

Defaults

N/A.

CommandPrivileged EXEC mode.

2-4

Command Reference

RLDP Commands

Mode

Usage Guide

N/A.

Configuration

The example below demonstrates how to use this command:

ExamplesRuijie# rldp reset

RelatedCommands

Platform

Command

Description

rldp enable

Enables RLDP globally.

N/A.

Description

2.7 show rldp
Use this command to display the RLDP information.
show rldp [ interface interface-id ]Parameter
Description

Parameter

Description

interface-id

Interface ID

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A.

Configuration

N/A.

ExamplesRelatedCommands

Platform

Command

Description

N/A.

N/A.

N/A.

Description

2-5

Command Reference

IP Event Dampening Commands(beta)

3 IP Event Dampening Commands(beta)
3.1 dampening
Use this command to enable the IP event dampening function on the interface. Use the no or default
form of this command to disable this function.
dampening [ half-life-period [ reuse-threshold suppress-threshold max-suppress [ restart[ restart-penalty ] ] ] ]no dampening
default dampening

Parameter
Description

Parameter

Description

half-life-period

Configures the half-life period of suppression penalty. The range isfrom 1 to 30. The unit is seconds. The default value is 5 seconds.

reuse-threshold

Configures the penalty threshold to unsuppress the interface. The
range is from 1 to 20,000. The default value is 1,000.

suppress-threshold

Configures the penalty threshold to suppress the interface. The range
is from 1 to 20,000. The default value is 2,000.

max-suppress

Configures the maximum suppress time. The range is from 1 to 255.
The default value is 4 times of the half-life-period.

restart-penalty

Configures the initial penalty value on the interface. The range is from
1 to 20,000. The default value is 2,000.

Defaults

IP event dampening is disabled by default.

Command

Interface configuration mode.

mode

Usage Guide

This function will influence the modules of the directly-connected/host route, static route, dynamic
route and VRRP. If one interface meets the configuration condition of this command, which is in the
suppression status, the above influenced modules consider the status of this interface as DOWN, so
as to delete the corresponding route and not transcieve the data packets on this interface.
Re-configuring the dampening command on the interface that has been configured this command
makes all dampening information on this interface cleared. However, the interface flapping times will
be remained unless use the clear counters command to clear the statistical information of theinterface.

Configuration

The following example configures the IP event dampening function.

ExamplesRuijie(config)#interface vlan 1
Ruijie(config-if-VLAN 1)# dampening 30 1500 10000 100

3-1

Command Reference

RelatedCommands

IP Event Dampening Commands(beta)

Command

Description

clear counters

Clears the interface counters.
Displays the statistics of the dampening

show dampening interface

interface.
Displays details of the dampening interface.

show interface dampening

Platform

When a Layer-3 port on a switch is converted to a Layer-2 port (for example, from a routed port to a

Description

switch port), the IP Event Dampening configuration on the port will be deleted.

3.2 show dampening interface
Use this command to show the statistics of the dampening interface.
show dampening interface

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/ global configuration mode/ interface configuration mode

mode

Usage Guide

N/A

Configuration

The following example displays the statistics of the dampening interface.

ExamplesRuijie# show dampening interface
3 interfaces are configured with dampening.
No interface is being suppressed.

RelatedCommands

Command

Description
Enables the IP event dampening function on

dampening

the interface.
Clears the interface counters.

clear counters

Displays details of IP event dampening

show interface dampening

Platform

configuration.

N/A

Description

3-2

Command Reference

IP Event Dampening Commands(beta)

3.3 show interface dampening
Use this command to display the details of IP event dampening configuration.
show interface [ interface-Id ] dampening

Parameter
Description

Parameter

Description

interface-id

Interface nameDefaults

N/A

CommandPrivileged EXEC mode/ global configuration mode/ interface configuration mode

mode

Usage Guide

If the interface-id is specified, only the dampening information of this specified interface is displayed.

Configuration

The following example shows the details of IP event dampening configuration.

ExamplesRuijie# show interface gigabitethernet 0/17 dampening
GigabitEthernet 0/17

RelatedCommands

Platform

Flaps Penalty Supp

ReuseTm HalfL

0

0

0

FALSE

30

ReuseV
1500

SuppV

10000

MaxSTm MaxP
100

15119

Restart0

DomainDescription

FlapsInterface flapping times.

Penalty

The current penalty value on the interface.

Supp

Suppressed or not.

ReuseTm

Time to unsuppress the interface, in seconds.

HalfL

Half-life period, in seconds.

ReuseV

Unsuppressed threshold.

SuppV

Start suppression threshold.

MaxSTmMaximum suppression time.

MaxP

Maximum penalty value.

Restart

The initial penalty value on the interface.

Command

Description

dampening

Enables the IP event dampening function.

clear counters

Clears the interface counters.

show dampening interface

Displays statistics of the dampening interface.

N/A

Description

3-3Security Configuration Commands
1 AAA Commands(beta)
2 RADIUS Commands(beta)
3 TACACS+ Commands(beta)
4 Global IP-MAC Binding Commands(beta)
5 Password-Policy Commands
6 Port Security Commands(beta)
7 Storm Control Commands
8 SSH Commands
9 CPU Protection Commands
10 DHCP Snooping Commands(beta)
11 DHCPv6 Snooping Commands(beta)
12 ARP-CHECK Commands(beta)
13 DAI Commands(beta)
14 IP Source Guard Commands(beta)
15 DoS Protection Commands
16 PPPoE Intermediate Agent Commands(beta)

Command Reference

AAA Commands(beta)

1 AAA Commands(beta)
1.1 aaa accounting commands
Use this command to configure NAS command accounting.
Use the no form of this command to restore the default setting.
aaa accounting commands level { default | list-name } start-stop method1 [ method2…]
no aaa accounting commands level { default | list-name }Parameter
Description

Parameterlevel

default

list-namemethodnone
group

Description
The accounting command level, 0-15. The message shall berecorded before which command level is executed is determined.
When this parameter is used, the following defined method list is
used as the default method for command accounting.
Name of the command accounting method list, which could be any
character strings.
It must be one of the keywords listed in the following table. One
method list can contain up to four methods.
Does not perform accounting.
Uses the server group for accounting, the TACACS+ server group is
supported.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

RGOS enables the accounting command function after enabling the login authentication. Afterenabling the accounting function, it sends the command information to the security service.
The configured accounting command method must be applied to the terminal line that needs
accounting command; otherwise it is ineffective.

Configuration

The following example enables NAS command accounting.

ExamplesRuijie(config)# aaa accounting commands 15 default start-stop group tacacs+

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

aaa authentication

Defines AAA authentication.

accounting commands

Applies the accounting commands to the

1-1Command Reference

AAA Commands(beta)terminal line.

Platform

N/A

Description

1.2 aaa accounting exec
Use this command to enable NAS access accounting.
Use the no form of this command to restore the default setting.
aaa accounting exec { default | list-name } start-stop method1 [ method2...]no aaa accounting exec { default | list-name }Parameter

Parameter

Description
default

list-namemethodnone
group

Description
When this parameter is used, the following defined method list is
used as the default method for Exec accounting.
Name of the Exec accounting method list, which could be any
character strings
It must be one of the keywords: none and group. One method list
can contain up to four methods.
Does not perform accounting.
Uses the server group for accounting, the RADIUS and TACACS+
server group is supported.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

RGOS enables the exec accounting function after enabling the login authentication.
After enabling the accounting function, it sends the account start information to the security serverwhen the users log in the NAS CLI, and sends the account stop information to the security serverwhen the users log out. If it does not send the account start information to the security server when auser logs in, it does not send the account stop information to the security server when a user logs out,either.
The configured exec accounting method must be applied to the terminal line that needs accounting
command; otherwise it is ineffective.

Configuration

The following example enables NAS access accounting.

ExamplesRuijie(config)# aaa accounting exec network start-stop group radius

1-2

Command Reference

AAA Commands(beta)

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

aaa authentication

Defines AAA authentication.
Applies the Exec accounting to the terminal

accounting commands

Platform

line.

N/A

Description

1.3 aaa accounting update
Use this command to enable the accounting update function.
Use the no form of this command to restore the default setting.
aaa accounting updateno aaa accounting update

Parameter
Description

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

If the AAA security service is not enabled, the accounting update function cannot be used. This
command is used to set the accounting interval if the AAA security service has been enabled.

Configuration

The following example enables the accounting update function.

ExamplesRuijie(config)# aaa new-model
Ruijie(config)# aaa accounting update

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

Platform

N/A

Description

1-3

Command Reference

AAA Commands(beta)

1.4 aaa accounting update periodic
Use this command to set the interval of sending the accounting update message.
Use the no form of this command to restore the default setting.
aaa accounting update periodic interval
no aaa accounting update periodic

Parameter

Parameter

Description

Description
Interval of sending the accounting update message, in the unit ofinterval

minutes. The value ranges from 1 to 525600. The shortest interval is
1 minute.

Defaults

The default is 5 minutes.

Command

Global configuration mode

Mode

Usage Guide

If the AAA security service is not enabled, the accounting update function cannot be used. This
command is used to set the accounting interval if the AAA security service has been enabled.

Configuration

The following example sets the interval of accounting update to 1 minute.

ExamplesRuijie(config)# aaa new-model
Ruijie(config)# aaa accounting update
Ruijie(config)# aaa accounting update periodic 1

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

aaa accounting network

Defines a network accounting method list.

Platform

N/A

Description

1.5 aaa authentication enable
Use this command to enable AAA Enable authentication and configure the Enable authentication
method list.
Use the no form of this command to delete the user authentication method list.
aaa authentication enable default method1 [ method2...]no aaa authentication enable default

1-4

Command Reference

Parameter
Description

Parameter
default

methodAAA Commands(beta)

Description
When this parameter is used, the following defined authentication
method list is used as the default method for Enable authentication.
It must be one of the keywords: local, none and group. One method
list can contain up to four methods.

local

Uses the local user name database for authentication.

none

Does not perform authentication.

group
enableDefaults

N/A

Command

Global configuration mode

Uses the server group for authentication. At present, the RADIUS andTACACS+ server groups are supported.
Enables AAA Enable authentication.

Mode

Usage Guide

If the AAA Enable authentication service is enabled on the device, users must use AAA for Enable
authentication negotiation. You must use the aaa authentication enable command to configure adefault or optional method list for Enable authentication.
The next method can be used for authentication only when the current method does not work.
The Enable authentication function automatically takes effect after configuring the Enable
authentication method list.

Configuration

The following example defines an AAA Enable authentication method list. In the authentication

Examplesmethod list, first the RADIUS security server is used for authentication. If the RADIUS security server
does not respond, the local user database is used for authentication.
Ruijie(config)# aaa authentication enable default group radius local

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

enableSwitchover the user level.

username

Defines a local user database.

Platform

N/A

Description

1.6 aaa authentication login
Use this command to enable AAA Login authentication and configure the Login authentication
method list.

1-5

Command Reference

AAA Commands(beta)

Use the no form of this command to delete the authentication method list.
aaa authentication login { default | list-name } method1 [ method2..]
no aaa authentication login { default | list-name }Parameter
Description

Parameter
default

list-namemethodDescription
When this parameter is used, the following defined authentication
method list is used as the default method for Login authentication.
Name of the user authentication method list, which could be any
character strings
It must be one of the keywords: local, none, group and subs. One
method list can contain up to four methods.

local

Uses the local user name database for authentication.

none

Does not perform authentication.

group
subs

Defaults

N/A

Command

Global configuration mode

Uses the server group for authentication. At present, the RADIUS
and TACACS+ server groups are supported.
Uses the subs database for authentication.

Mode

Usage Guide

If the AAA Login authentication security service is enabled on the device, users must use AAA for
Login authentication negotiation. You must use the aaa authentication login command to configurea default or optional method list for Login authentication.
The next method can be used for authentication only when the current method does not work.
You need to apply the configured Login authentication method to the terminal line which needs Loginauthentication. Otherwise, the configured Login authentication method is invalid.

Configuration

The following example defines an AAA Login authentication method list named list-1. In the

Examplesauthentication method list, first the RADIUS security server is used for authentication. If the RADIUS
security server does not respond, the local user database is used for authentication.
Ruijie(config)# aaa authentication login list-1 group radius local

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

login authentication

Applies the Login authentication method to the terminal lines.

username

Defines a local user database.

Platform

N/A

Description

1-6

Command Reference

AAA Commands(beta)

1.7 aaa authorization commands
Use this command to authorize the command executed by the user who has logged in the NAS CLI.
Use the no form of this command to restore the default setting.
aaa authorization commands level { default | list-name } method1 [ method2...]no aaa authorization commands level { default | list-name }Parameter

Parameter

Description

Description

level

Command level to be authorized in the range from 0 to 15

default

list-namemethodnone
group

When this parameter is used, the following defined method list is used as thedefault method for command authorization.
Name of the user authorization method list, which could be any character
strings
It must be one of the keywords: none and group. One method list can containup to four methods.
Do not perform authorization.
Uses the server group for authorization. At present, the TACACS+ servergroup is supported.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

RGOS supports authorization of the commands executed by the users. When the users input andattempt to execute a command, AAA sends this command to the security server. This command is to
be executed if the security server allows to. Otherwise, it will prompt command deny.
It is necessary to specify the command level when configuring the command authorization, and thisspecified command level is the default command level.
The configured command authorization method must be applied to terminal line which requires thecommand authorization. Otherwise, the configured command authorization method is ineffective.

Configuration

The following example uses the TACACS+ server to authorize the level 15 command.

ExamplesRuijie(config)# aaa authorization commands 15 default group tacacs+

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

authorization commands

Applies the command authorization for the terminal line.

Platform

N/A

1-7

Command Reference

AAA Commands(beta)

Description

1.8 aaa authorization config-commands
Use this command to authorize the configuration commands (including in the global configuration
mode and its sub-mode).
Use the no form of this command to restore the default setting.
aaa authorization config-commands
no aaa authorization config-commands

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

If you only authorize the commands in the non-configuration mode (for example, privileged EXEC
mode), you can use the no form of this command to disable the authorization function in theconfiguration mode, and execute the commands in the configuration mode and its sub-mode without
command authorization.

Configuration

The following example enables the configuration command authorization function.

ExamplesRuijie(config)# aaa authorization config-commands

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

aaa authorization commands

Defines the AAA command authorization.

Platform

N/A

Description

1.9 aaa authorization console
Use this command to authorize the commands of the users who have logged in the console.
Use the no form of this command to restore the default setting.
aaa authorization console
no aaa authorization console

1-8Command Reference

AAA Commands(beta)

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

RGOS supports to identify the users logged in from the console and from other terminals, configure
whether to authorize the users logged in from the console or not. If the command authorization
function is disabled on the console, the authorization method list applied to the console line isineffective.

Configuration

The following example enables the aaa authorization console function.

ExamplesRuijie(config)# aaa authorization console

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

aaa authorization commands

Defines the AAA command authorization.

authorization commands

Applies the command authorization to the terminal line.

Platform

N/A

Description

1.10 aaa authorization exec
Use this command to authorize the users logged in the NAS CLI and assign the authority level.
Use the no form of this command to restore the default setting.
aaa authorization exec { default | list-name } method1 [ method2...]no aaa authorization exec { default | list-name }Parameter

Parameter

Description
default

list-namemethodDescription
When this parameter is used, the following defined method list is usedas the default method for Exec authorization.
Name of the user authorization method list, which could be any
character strings
It must be one of the keywords listed in the following table. One
method list can contain up to four methods.

local

Uses the local user name database for authorization.

none

Does not perform authorization.

1-9

Command Referencegroup

AAA Commands(beta)

Uses the server group for authorization. At present, the RADIUS
server group is supported.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

RGOS supports authorization of users logged in the NAS CLI and assignment of CLI authority level(0-15). The aaa authorization exec function is effective on condition that Login authentication
function has been enabled. It cannot enter the CLI if it fails to enable the aaa authorization exec.
You must apply the exec authorization method to the terminal line; otherwise the configured method
is ineffective.

Configuration

The following example uses the RADIUS server to authorize Exec.

ExamplesRuijie(config)# aaa authorization exec default group radius

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

authorization exec

Applies the command authorization to the terminal line.

username

Defines a local user database.

Platform

N/A

Description

1.11 aaa authorization network
Use this command to authorize the service requests (including such protocols as PPP and SLIP) fromthe users that access the network.
Use the no form of this command to restore the default setting.
aaa authorization network { default | list-name } method1 [ method2...]no aaa authorization network { default | list-name }Parameter
Description

Parameter
default

methodDescription
When this parameter is used, the following defined method list is usedas the default method for Network authorization.
It must be one of the keywords: none and group. One method list cancontain up to four methods.

none

Does not perform authorization.

group

Uses the server group for authorization. At present, the RADIUS

1-10

Command Reference

AAA Commands(beta)

server group is supported.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

RGOS supports authorization of all the service requests related to the network, such as PPP and
SLIP. If authorization is configured, all the authenticated users or interfaces will be authorized
automatically.
Three different authorization methods can be specified. Like authorization, the next method can beused for authorization only when the current authorization method does not work. If the current
authorization method fails, other subsequent authorization method is not used.
The RADIUS server authorizes authenticated users by returning a series of attributes. Therefore,
RADIUS authorization is based on RADIUS authorization. RADIUS authorization is performed only
when the user passes the RADIUS authorization.

Configuration

The following example uses the RADIUS server to authorize network services.

ExamplesRuijie(config)# aaa authorization network default group radius

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

aaa accounting

Defines AAA accounting.

aaa authentication

Defines AAA authentication.

username

Defines a local user database.

Platform

N/A

Description

1.12 aaa local authentication attempts
Use this command to set login attempt times.
aaa local authentication attempts max-attempts

Parameter

Parameter

Description

Description

max-attempts

In the range from 1 to 2,147,483,647

Defaults

The default is 3.

Command

Global configuration mode

1-11

Command Reference

AAA Commands(beta)

Mode

Usage Guide

Use this command to configure login attempt times.

Configuration

The following example sets login attempt times to 6.

ExamplesRuijie #configure terminal
Ruijie(config)#aaa local authentication attempts 6

RelatedCommand

Description

Commands

show running-config

Displays the current configuration of the switch.

show aaa lockout

Displays the lockout configuration parameter of current login.

Platform

N/A

Description

1.13 aaa local authentication lockout-time
Use this command to configure the lockout-time period when the login user has attempted for morethan the limited times.
aaa local authentication lockout-time lockout-timeParameter

Parameter

Description

Description

lockout-time

In the range from 1 to 43,200 in the unit of minutes

Defaults

The default is 15 minutes.

Command

Global configuration mode

Mode

Usage Guide

Use this command to configure the length of lockout-time when the login user has attempted for morethan the limited times.

Configuration

The following example sets the lockout-time period to 5 minutes.

ExamplesRuijie#configure terminal
Ruijie(config)#aaa local authentication lockout-time 5

RelatedCommand

Description

Commands

show running-config

Displays the current configuration of the switch.

show aaa lockout

Displays the lockout configuration parameter of current login.

1-12

Command Reference

Platform

AAA Commands(beta)

N/A

Description

1.14 aaa log enable
Use this command to enable the system to print the syslog informing AAA authentication success.
Use the no form of this command to restore the default setting.
aaa log enable
no aaa log enable

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

Use this command to enable the system to print the syslog informing aaa authentication success.

Configuration

The following example disables the system to print the syslog informing aaa authentication success.

ExamplesRuijie(config)# no aaa log enable

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.15 aaa log rate-limit
Use this command to set the rate of printing the syslog informing AAA authentication success.
Use the no form of this command to restore the default printing rate.
aaa log rate-limit num
no aaa log rate-limit

Parameter

Parameter

Description

Description
The number of syslog entries printed per second. The range is fromnum

0 to 65,535.
0 indicates the printing rate is not limited.

1-13

Command Reference

AAA Commands(beta)

Defaults

The default is 5.

Command

Global configuration mode

Mode

Usage Guide
Too much printing may flood the screen or even reduce device performance. In this case, use thiscommand to adjust the printing rate.

Configuration

The following example sets the rate of printing the syslog informing AAA authentication success to

Examples10.
Ruijie(config)# aaa log rate-limit 10

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1.16 aaa new-model
Use this command to enable the RGOS AAA security service.
Use the no form of this command to restore the default setting.
aaa new-modelno aaa new-modelParameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

Use this command to enable AAA. If AAA is not enabled, none of the AAA commands can be
configured.

Configuration

The following example enables the AAA security service.

ExamplesRuijie(config)# aaa new-model

1-14

Command Reference

AAA Commands(beta)

RelatedCommand

Description

Commands

aaa authentication

Defines a user authentication method list.

aaa authorization

Defines a user authorization method list.

aaa accounting

Defines a user accounting method list.

Platform

N/A

Description

1.17 clear aaa local user lockout
Use this command to clear the lockout user list.
clear aaa local user lockout { all | user-name word }Parameter

Parameter

Description

Description

all

Indicates all locked users.

user-name word

Indicates the ID of the locked User.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

Use this command to clear all the user lists or a specified user list.

Configuration

The following example clears the lockout user list.

ExamplesRuijie# clear aaa local user lockout all

RelatedCommand

Description

Commands

show running-config

Displays the current configuration of the switch.

show aaa lockout

Displays the lockout configuration parameter of current login.

Platform

N/A

Description

1.18 show aaa accounting update
Use this command to display the accounting update information.
show aaa accounting update

1-15Command Reference

AAA Commands(beta)

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

Mode

Usage Guide

Use this command to display the accounting update interval and whether the accounting update isenabled.

Configuration

The following example displays the accounting update information.

ExamplesRuijie# show aaa accounting update

RelatedCommand

Description

Commands

aaa new-model

Enables the AAA security service.

aaa domain enable

Enables the domain-name-based AAA service.

Platform

N/A

Description

1.19 show aaa group
Use this command to display all the server groups configured for AAA.
show aaa group

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following command displays all the server groups.

ExamplesRuijie# show aaa group
Type

Reference

Name---------- ---------- ----------

1-16

Command Reference

AAA Commands(beta)

radius1

radiustacacs+1

tacacs+radius1

dot1x_group

radius1login_group

radius1enable_group

RelatedCommand

Description

Commands

aaa group server

Configures the AAA server group.

Platform

N/A

Description

1.20 show aaa lockout
Use this command to display the lockout configuration.
show aaa lockout

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

Mode

Usage Guide

Use this command to display the lockout configuration.

Configuration

The following example displays the lockout configuration.

ExamplesRuijie# show aaa lockout
Lock tries:

3

Lock timeout: 15 minutes

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1-17

Command Reference

AAA Commands(beta)

1.21 show aaa method-list
Use this command to display all AAA method lists.
show aaa method-list

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

Mode

Usage Guide

Use this command to display all AAA method lists.

Configuration

The following example displays the AAA method list.

ExamplesRuijie# show aaa method-list
Authentication method-list
aaa authentication login default group radius
aaa authentication ppp default group radius
aaa authentication dot1x default group radius
aaa authentication dot1x san-f local group angel group rain none
aaa authentication enable default group radius
Accounting method-list
Authorization method-list
aaa authorization network default group radius

RelatedCommand

Description

Commands

aaa authentication

Defines a user authentication method list

aaa authorization

Defines a user authorization method list

aaa accounting

Defines a user accounting method list

Platform

N/A

Description

1.22 show aaa user
Use this command to display AAA user information.
show aaa user { all | lockout | by-id session-id | by-name user-name }1-18

Command Reference

AAA Commands(beta)

Parameter

Parameter

Description

Description

all

Displays all AAA user information.

lockout

Displays the locked AAA user information.
Displays the information of the AAA user that with aby-id session-id

specified session ID.
Displays the information of the AAA user with a specified

by-name user-nameuser name.

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

Mode

Usage Guide

Use this command to display AAA user information.

Configuration

The following example displays AAA user information.

ExamplesRuijie#show aaa user all----------------------------Id ----- Name
2345687901

wwxy----------------------------Ruijie# show aaa user by-id 2345687901----------------------------Id ----- Name
2345687901

wwxy

Ruijie# show aaa user by-name wwxy----------------------------Id ----- Name
2345687901

wwxy-----------------------------

Ruijie# show aaa user lockout

Name

Tries

Lock

Timeout(min)-------------------------------- ---------- ---------- ------------

1-19

Command Reference

AAA Commands(beta)

Ruijie#RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

1-20

Command Reference

RADIUS Commands(beta)

2 RADIUS Commands(beta)
2.1 aaa group server radius
Use this command to enter AAA server group configuration mode.
Use the no form of this command to restore the default setting.
aaa group server radius nameno aaa group server radius nameParameter
Description

Parameter

Description

nameServer group name. Keywords “radius” and “tacacs +” are excluded
as they are the default RADIUS and TACACS+ server group names.

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

This command is used to configure a RADIUS AAA server group.

Configuration

The following example configures a RADIUS AAA server group named ss.

ExamplesRuijie(config)# aaa group server radius ss
Ruijie(config-gs-radius)# end
Ruijie# show aaa group
Type

Reference

Name---------- ---------- ----------

RelatedCommands

Platform

radius1

radiustacacs+1

tacacs+radius1

ssCommand

Description

N/A

N/A

N/A

Description

2-1

Command Reference

RADIUS Commands(beta)

2.2 ip radius source-interface
Use this command to specify the source IP address for the RADIUS packet.
Use the no form of this command to delete the source IP address for the RADIUS packet.
ip radius source-interface interface-nameno radius source-interface interface-nameParameter
Description

Parameter

Description

interface-name

Interface that the source IP address of the RADIUS packet belongs
to.

Defaults

The source IP address of the RADIUS packet is set by the network layer.

Command

Global configuration mode

mode

Usage Guide

In order to reduce the NAS information to be maintained on the RADIUS server, use this command to
set the source IP address of the RADIUS packet. This command uses the first IP address of thespecified interface as the source IP address of the RADIUS packet. This command is used in thelayer 3 devices.

Configuration

The following example specifies that the RADIUS packet obtains an IP address from the

ExamplesGigabitEthernet 0/1 interface and uses it as the source IP address of the RADIUS packet.
Ruijie(config)# ip radius source-interface GigabitEthernet 0/1

RelatedCommands

Platform

Command

Description

radius-server hostDefines the RADIUS server.

ip address

Configures the IP address of the interface.

N/A

Description

2.3 radius set qos cos
Use this command to set the QoS value sent by the RADIUS server as the CoS value of the interface.
Use the no form of this command to restore the default setting.
radius set qos cos
no radius set qos cos

2-2Command Reference

Parameter
Description

RADIUS Commands(beta)

Parameter

Description

N/A

N/A

Defaults

Set the QoS value sent by the RADIUS server as the DSCP value.

Command

Global configuration mode.

Mode

Usage Guide

This command is used to set the QoS value sent by the RADIUS server as the CoS value, and the
DSCP value by default.

Configuration

The following example sets the QoS value sent by the RADIUS server as the CoS value of the

Examplesinterface:
Ruijie(config)# radius set qos cos

RelatedCommands

Command

Description
Extends RADIUS as not to differentiate the IDs

radius vendor-specific extend

Platformof private vendors.

N/A

Description

2.4 radius support cui
Use this command to enable RADIUS to support the cui function.
Use the no form of this command to restore the default setting.
radius support cui
no radius support cui

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

2-3

Command Reference

RADIUS Commands(beta)

Usage Guide

This command is used to enable RADIUS to support the cui function.

Configuration

The following example enables RADIUS to support the cui function.

ExamplesRuijie(config)# radius support cui

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.5 radius vendor-specific attribute support
Use this command to configure whether RADIUS accounting request packets carry the private
attribute of a specified vendor.
Use the no form of this command to configure that RADIUS accounting request packets do not carry
the private attribute of a specified vendor.
radius vendor-specific attribute support { cisco | huawei | ms}
no radius vendor-specific attribute support { cisco | huawei | ms}

Parameter
Description

Parameter

Description

cisco

Indicates the private attribute of Cisco.

huaweiIndicates the private attribute of Huawei.

ms

Indicates the private attribute of Microsoft.

Defaults

By default, RADIUS accounting request packets carry the private attribute of a specified vendor.

Command

Global configuration mode

Mode

Usage Guide

This command is used to configure whether RADIUS accounting request packets carry the private
attribute of a specified vendor as required.

Configuration

1. The following example configures that RADIUS accounting request packets carry the private

Examplesattribute of Huawei.
Ruijie(config)# radius vendor-specific attribute support huawei

2-4Command Reference

RADIUS Commands(beta)

2. The following example configures that RADIUS accounting request packets do not carry the private
attribute of Huawei.
Ruijie(config)# no radius vendor-specific attribute support huawei

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.6 radius vendor-specific extend
Use this command to extend RADIUS not to differentiate the IDs of private vendors.
Use the no form of this command to restore the default setting.
radius vendor-specific extend
no radius vendor-specific extend

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

Only the private vendor IDs of Ruijie are recognized.

Command

Global configuration mode

Mode

Usage Guide

This command is used to identify the attributes of all vendor IDs by type.

Configuration

The following example extends RADIUS so as not to differentiate the IDs of private vendors:

ExamplesRuijie(config)# radius vendor-specific extend

RelatedCommands

Command

Description

radius attribute

Configures vendor type.
Sets the QoS value sent by the RADIUS server

radius set qos cos

Platformas the cos value of the interface.

N/A

Description

2-5

Command Reference

RADIUS Commands(beta)

2.7 radius-server account attribute
Use this command to enable account-request packets to contain a specified RADIUS attribute.
Use the no or default form of this command to restore the default setting.
radius-server account attribute type package
no radius-server account attribute type package
default radius-server account attribute type package

Use this command to disable account-request packets to contain a specified RADIUS attribute.
Use the no or default form of this command to restore the default setting.
radius-server account attribute type unpackage
no radius-server account attribute type unpackage
default radius-server account attribute type unpackage

Parameter
Description

Parameter

Description

type

RADIUS attribute in the range from 1 to 255

Defaults

RFC-compliant

Command

Global configuration mode

Mode

Usage Guide

Use this command to enable or disable account-request packets to contain a specified RADIUS
attribute.

Configuration

The following example disables account-request packets to contain attribute NAS-PORT-ID.

ExamplesRuijie(config)# radius-server account attribute 87 unpackage

Platform
Description

N/A

2.8 radius-server account update retransmit
Use this command to configure accounting update packet retransmission for the second
generation Web authentication user.
Use the no form of this command to restore the default setting,radius-server account update retransmit
no radius-server account update retransmit

2-6Command Reference

Parameter
Description

RADIUS Commands(beta)

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command Mode

Global configuration mode

Usage Guide

This command is used to configure accounting update packet retransmission for the second
generation Web authentication user exclusively.

Configuration

The following example configures accounting update packet retransmission for the second

Examplesgeneration Web authentication user.
Ruijie(config)#radius-server account update retransmit

Related Commands

Platform

Command

Description

N/A

N/A

N/A

Description

2.9 radius-server account vendor
Use this command to enable account-request packets to contain vendor-specific RADIUS
attributes.
Use the no or default form of this command to restore the default setting.
radius-server account vendor vendor_name package
no radius-server account vendor vendor_name package
default radius-server account vendor vendor_name package

Parameter
Description

Parameter

Description

vendor_namecmcc/ microsoft/cisco

Defaults

Account-request packets do not contain vendor- specific RADIUS attributes by default.

Command Mode

Global configuration mode

Usage Guide

Use this command to enable account-request packets to contain vendor-specific RADIUS
attributes.

2-7Command Reference

RADIUS Commands(beta)

Configuration

The following example enables account-request packets to contain “cmcc”.

ExamplesRuijie(config)# radius-server account vendor cmcc package

Platform
Description

N/A

2.10 radius-server attribute class
Use this command to analyze the flow control value of the RADIUS CLASS attributes.
Use the no form of this command to restore the default setting.
radius-server attribute class user-flow-control { format-16bytes | format-32bytes }no radius-server attribute classParameter
Description

Parameter

Descriptionuser-flow-control

Analyzes flow control value in the CLASS attribute.

format-16bytes

Sets the format of flow control value to 16 bytes.

format-32bytes

Sets the format of flow control value to 32 bytes.

Defaults

This function is disabled by default.

Command Mode

Global configuration mode

Usage Guide

This command is required if the server pushes the flow control through the CLASS attribute.

Configuration

The following example analyzes the flow control value of the CLASS attribute and sets the format

Examplesto 32 bytes.
Ruijie(config)#radius-server

attributeclass

user-flow-control

format-32bytes

Related Commands

Platform

Command

Description

N/A

N/A

N/A

Description

2.11 radius-server attribute 31
Use this command to specify the MAC-based format of RADIUS Calling-Station-ID attribute.

2-8

Command Reference

RADIUS Commands(beta)

Use the no form of this command to restore the default setting.
radius-server attribute 31 mac format { ietf | normal | unformatted }no radius-server attribute 31 mac format

Parameter
Description

Parameter

Description

ietf

The standard format specified by the IETF
RFC3580. ‘-‘is used as the separator, forexample: 00-D0-F8-33-22-AC.
Normal format representing the MAC

normaladdress. ;.’is used as the separator. For
example: 00d0.f833.22ac.
No format and separator. By default, unformatted

unformatted

is used. For example: 00d0f83322ac.

Defaults

The default format is unformatted.

Command Mode

Global configuration mode

Usage Guide

Some RADIUS security servers (mainly used to 802.1x authentication) may identify the IETF
format only. In this case, the RADIUS Calling-Station-ID attribute shall be set as the IETF format
type.

Configuration

The following example defines the RADIUS Calling-Station-ID attribute as IETF format.

ExamplesRuijie(config)# radius-server attribute 31 mac format ietf

Related Commands

Command

Description

radius-server hostDefines the RADIUS server.

Platform

N/A

Description

2.12 radius-server authentication attribute
Use this command to enable access-request packets to contain a specified RADIUS attribute.
Use the no or default form of this command to restore the default setting.
radius-server authentication attribute type package
no radius-server authentication attribute type package
default radius-server authentication attribute type package

2-9Command Reference

RADIUS Commands(beta)

Use this command to disable access-request packets to contain a specified RADIUS attribute.
Use the no or default form of this command to restore the default setting.
radius-server authentication attribute type unpackage
no radius-server authentication attribute type unpackage
default radius-server authentication attribute type unpackage

Parameter
Description

Parameter

Description

type

RADIUS attribute in the range from 1 to 255

Defaults

RFC-compliant

Command

Global configuration mode

Mode

Usage Guide

Use this command to enable access-request packets to contain a specified RADIUS attribute.

Configuration

The following example disables access-request packets to contain attribute NAS-PORT-ID.

ExamplesRuijie(config)# radius-server authentication attribute 87 unpackage

Platform
Description

N/A

2.13 radius-server authentication vendor
Use this command to enable access-request packets to contain vendor-specific RADIUS attributes.
Use the no or default form of this command to restore the default setting.
radius-server authentication vendor vendor_name package
no radius-server authentication vendor vendor_name package
default radius-server authentication vendor vendor_name package
Parameter
Description

Parameter

Description

vendor_namecmcc/ microsoft/cisco

Defaults

Access-request packets do not contain vendor- specific RADIUS attributes by default.

Command

Global configuration mode

Mode

2-10

Command Reference

RADIUS Commands(beta)

Usage Guide

Use this command to enable access-request packets to contain vendor- specific RADIUS attributes.

Configuration

The following example enables access-request packets to contain “cmcc”.

ExamplesRuijie(config)# radius-server authentication vendor cmcc package

Platform
Description

N/A

2.14 radius-server dead-criteria
Use this command to configure criteria on a device to determine that the RADIUS server isunreachable.
Use the no form of this command to restore the default setting.
radius-server dead-criteria { time seconds [ tries number ] | tries number }no radius-server dead-criteria { time seconds [ tries number ] | tries number }Parameter
Description

Parameter

Description
Configures the timeout value. If the device does not receive a correcttime seconds

response packet from the RADIUS server within the specified time,
the RADIUS server is considered to be unreachable. The value is in
the range from 1 to 120 in the unit of seconds.
Configures the successive timeout times. When sending a request

tries number

from the device to the RADIUS server times out for the specified
times, the device considers that the RADIUS server is unreachable.
The value is in the range from 1 to 100 in the unit of seconds.

Defaults

The default time seconds is 60 and tries number is 10.

Command

Global configuration mode

Mode

Usage Guide

If a RADIUS server meets the timeout and timeout times at the same time, it is considered to be
unreachable. This command is used to adjust the parameter conditions of timeout and timeout times.

Configuration

The following example sets the timeout to 120 seconds and timeout times to 20.

ExamplesRuijie(config)# radius-server dead-criteria time 120 tries 20

RelatedCommands

Command

Description

2-11

Command Reference

RADIUS Commands(beta)

Defines the RADIUS security server.

radius-server hostDefines the duration when a device stops
sending any requests to an unreachable

radius-server deadtime

RADIUS server.
Defines the timeout for the packet

radius-server timeout

Platform

re-transmission.

N/A

Description

2.15 radius-server deadtime
Use this command to configure the duration when a device stops sending any requests to an
unreachable RADIUS server.
Use the no form of this command to restore the default setting.
radius-server deadtime minutes
no radius-server deadtime

Parameter
Description

Parameter

Description
Defines the duration in minutes when the device stops sending any

minutesrequests to the unreachable RADIUS server. The value is in therange from 1 to 1,440 in the unit of minutes.

Defaults

The default value of minutes is 0, that is, the device keeps sending requests to the unreachable
RADIUS server.

Command

Global configuration mode

Mode

Usage Guide

If active RADIUS server detection is enabled on the device, the time parameter of this command does
not take effect on the RADIUS server. Otherwise, the RADIUS server becomes reachable when the
duration set by this command is shorter than the unreachable time.

Configuration

The following example sets the duration when the device stops sending requests to 1 minute.

ExamplesRuijie(config)# radius-server deadtime 1

RelatedCommands

Command

Description

radius-server hostDefines the RADIUS security server.

2-12

Command Reference

RADIUS Commands(beta)

Defines the criteria to determine that a RADIUS

radius-server dead-criteria

server is unreachable.

Platform

N/A

Description

2.16 radius-server hostUse this command to specify a RADIUS security server host.
Use the no form of this command to restore the default setting.
radius-server host { ipv4-address | ipv6-address } [ auth-port port-number ] [ acct-port
port-number ] [ test username name [ ignore-auth-port ] [ ignore-acct-port ] [ idle-time time ]][ key [ 0 | 7 ] text-string ]no radius-server host { ipv4-address | ipv6-address }Parameter
Description

Parameter

Description

ipv4-address

IPv6 address of the RADIUS security server host.

ipv6-address

IPv4 address of the RADIUS security server host.

auth-port

UDP port used for RADIUS authentication.

port-number
acct-port
port-number

test username nameignore-auth-port

ignore-acct-port

Number of the UDP port used for RADIUS authentication. If it is set to0, this host does not perform authentication.
UDP port used for RADIUS accounting.
Number of the UDP port used for RADIUS accounting. If it is set to 0,
this host does not perform accounting.
(Optional) Enables the active detection to the RADIUS security serverand specify the username used by the active detection.
(Optional) Disables the detection to the authentication port on the
RADIUS security server. It is enabled by default.
(Optional) Disables the detection to the authentication port on the
RADIUS security server. It is enabled by default.
(Optional) Sets the interval of sending the test packets to theidle-time timereachable RADIUS security server, which is 60 minutes by default
and in the range of 1 to 1440 minutes (namely 24 hours).
Configure a shared key for the server. The type of encryption can be

key [ 0 | 7 ] text-string

specified. 0 is no encryption and 7 is simple encryption. The default is0.

Defaults

No RADIUS host is specified by default.

2-13Command Reference

CommandRADIUS Commands(beta)

Global configuration mode

Mode

Usage Guide

In order to implement the AAA security service using RADIUS, you must define a RADIUS security
server. You can define one or more RADIUS security servers using the radius-server hostcommand.

Configuration

The following example defines a RADIUS security server host:

ExamplesRuijie(config)# radius-server host 192.168.12.1

The following example defines a RADIUS security server host in the IPv4 environment, enable theactive detection with the detection interval 60 minutes and disable the accounting UDP port detection:
Ruijie(config)# radius-server host 192.168.100.1 test username viven
ignore-acct-port idle-time 60

The following example defines a RADIUS security server host in the IPv6 environment
Ruijie(config)# radius-server host 3000::100

RelatedCommands

Command

Description

aaa authentication

Defines the AAA authentication method list
Defines a shared password for the RADIUS

radius-server key

security server.
Defines the number of RADIUS packet

radius-server retransmit

Platform

retransmissions.

N/A

Description

2.17 radius-server key
Use this command to define a shared password for the network access server (device) tocommunicate with the RADIUS security server.
Use the no form of this command to restore the default setting.
radius-server key [ 0 | 7 ] text-string
no radius-server key

Parameter
Description

Parameter

Description

text-string

Text of the shared password

2-14

Command Reference

0|7

RADIUS Commands(beta)

Password encryption type.
0: no encryption;
7: Simply-encrypted.

Defaults

No shared password is specified by default.

CommandMode

Global configuration mode.

Usage Guide

A shared password is the basis for communications between the device and the RADIUS security
server. In order to allow the device to communicate with the RADIUS security server, you must define
the same shared password on the device and the RADIUS security server.

Configuration

The following example defines the shared password aaa for the RADIUS security server:

ExamplesRuijie(config)# radius-server key aaa

RelatedCommands

Command

Description

radius-server hostDefines the RADIUS security server.
Defines the number of RADIUS packet

radius-server retransmit

retransmissions.
Defines the timeout for the RADIUS packet.

radius-server timeout

Platform

N/A

Description

2.18 radius-server retransmit
Use this command to configure the number of packet retransmissions before the device considers
that the RADIUS security server does not respond.
Use the no form of this command to restore the default setting.
radius-server retransmit retries
no radius-server retransmit

Parameter
Description

Defaults

Parameter

Description

retriesNumber of retransmissions in the range from 1 to 100

The default is 3.

2-15

Command Reference

CommandRADIUS Commands(beta)

Global configuration mode.

Mode

Usage Guide

AAA uses the next method to authenticate users only when the current security server forauthentication does not respond. When the device retransmits the RADIUS packet for the specified
times and the interval between every two retries is timeout, the device considers that the security
sever does not respond.

Configuration

The following example sets the number of retransmissions to 4.

ExamplesRuijie(config)# radius-server retransmit 4

RelatedCommands

Command

Description

radius-server hostDefines the RADIUS security server.
Defines a shared password for the RADIUS

radius-server key

server.
Defines the timeout for the RADIUS packet.

radius-server timeout

Platform

N/A

Description

2.19 radius-server source-port
Use this command to configure the source port to send RADIUS packets.
Use the no form of this command to restore the default setting.
radius-server source-port port
no radius-server source-port

Parameter
Description

Parameter

Description

port

The port ID, in the range from 1 to 65535.

Defaults

The default is a random number.

Command

Global configuration mode

Mode

Usage Guide

The source port is random by default. This command is used to specify a source port.

Configuration

The following example configures source port 10000 to send RADIUS packets.

2-16

Command Reference

ExamplesRelatedCommands

Platform

RADIUS Commands(beta)

Ruijie(config)# radius-server source-port 10000

Command

Description

N/A

N/A

N/A

Description

2.20 radius-server timeout
Use this command to set the time for the device to wait for a response from the security server after
retransmitting the RADIUS packet.
Use the no form of this command to restore the default setting.
radius-server timeout seconds
no radius-server timeout

Parameter
Description

Defaults

Parameter

Description

seconds

Timeout in the range from 0 to 1,000 in the unit of seconds.

The default is 5 seconds.

CommandMode

Global configuration mode

Usage Guide

This command is used to change the timeout of packet retransmission.

Configuration

The following example sets the timeout to 10 seconds.

ExamplesRuijie(config)# radius-server timeout 10

RelatedCommands

Command

Description

radius-server hostDefines the RADIUS security server.
Defines the number of the RADIUS packet

radius-server retransmit

retransmissions.
Defines a shared password for the RADIUS

radius-server key

Platform

server.

N/A

2-17

Command Reference

RADIUS Commands(beta)

Description

2.21 server auth-port acct-port
Use this command to add the server of the AAA server group.
Use the no form of this command to restore the default setting.
server { ipv4-addr | ipv6-addr} [ auth-port port1 ] [ acct-port port2 ]no server { ipv4-addr | ipv6-addr} [ auth-port port1 ] [ acct-port port2 ]Parameter
Description

Parameter

Description

ip-addrServer IP address

Ipv6-addr

Server IPv6 address

port1Server authentication port

port2

Server accounting port

Defaults

No server is configured by default.

CommandServer group configuration mode

Mode

Usage Guide

N/A

Configuration

The following example adds server 192.168.4.12 to server group ss and sets the accounting port andExamplesauthentication port to 5 and 6 respectively.
Ruijie(config)# aaa group server radius ss
Ruijie(config-gs-radius)# server 192.168.4.12 acct-port 5 auth-port 6
Ruijie(config-gs-radius)# end
Ruijie# show aaa group
Type

Reference

Name---------- ---------- ---------radius

RelatedCommands

Platform1

radiustacacs+1

tacacs+radius1

ssCommand

Description

N/A

N/A

N/A

2-18

Command Reference

RADIUS Commands(beta)

Description

2.22 show radius acct statistics
Use this command to display RADIUS accounting statistics.
show radius acct statistics

Parameter Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command Mode

Global configuration mode/Privileged EXEC mode/Interface configuration mode

Usage Guide

N/A

Configuration

The following example displays RADIUS accounting statistics.

ExamplesRuijie#show radius acct statistics
Accounting Servers:
Server Index..................................... 1
Server Address................................... 192.168.1.1
Server Port...................................... 1813
Msg Round Trip Time.............................. 0 (msec)
First Requests................................... 1
Retry Requests................................... 1
Accounting Responses............................. 0
Malformed Msgs................................... 0
Bad Authenticator Msgs........................... 0
Pending Requests........

Related Commands

Platform Description

Command

Description

N/A

N/A

N/A

2.23 show radius attribute
Use this command to display standard RADIUS attributes.
show radius attribute

2-19Command Reference

Parameter
Description

CommandRADIUS Commands(beta)

Parameter

Description

N/A

N/A

Global configuration mode/Privileged EXEC mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays standard RADIUS attributes.

ExamplesRuijie#sh radius attribute
type

implicate-------------

1..........User-Name
2..........User-Password
3..........Chap-Password
4..........NAS-Ip-Addr
5..........Nas-Ip-Port
6..........Service-Type
7..........Framed-Protocol
8..........Frame-Ip-Address
9..........Framed-Ip-Mask
10..........Framed-Routing
11..........Filter-Id
12..........Framed-Mtu
13..........Framed-Compress
14..........Login-Ip-Host
15..........Login-Service
16..........Login-Tcp-Port
18..........Reply-Message
19..........Callback-Num
20..........Callback-Id
22..........Framed-Route23..........Framed-IPX-Network
24..........State
25..........Class
26..........Vendor-Specific27..........Session-Timeout
28..........Idle-Timeout
29..........Termination-Action

2-20

Command Reference

RADIUS Commands(beta)

30..........Called-Station-Id
31..........Calling-Station-Id
32..........Nas-Id
33..........Proxy-State
34..........Login-LAT-Service
35..........Login-LAT-Node36..........Login-LAT-Group
37..........Framed-AppleTalk-Link
38..........Framed-AppleTalk-Net
39..........Framed-AppleTalk-Zone
40..........Acct-Status-Type
41..........Acct-Delay-Time
42..........Acct-Input-Octets
43..........Acct-Output-Octets
44..........Acct-Session-Id
45..........Acct-Authentic
46..........Acct-Session-Time
47..........Acct-Input-Packet
48..........Acct-Output-Packet
49..........Acct-Terminate-Cause
50..........Acct-Multi-Session-ID
51..........Acct-Link-Count
52..........Acct-Input-Gigawords
53..........Acct-Output-Gigawords
60..........Chap-Challenge
61..........Nas-Port-Type
62..........Port-Limit
63..........Login-Lat-Port
64..........Tunnel-Type
65..........Tunnel-Medium-Type
66..........Tunnel-Client-EndPoint
67..........Tunnel-Service-EndPoint
79..........eap msg
80..........Message-Authenticator
81..........group id
85..........Acct-Interim-Interval
87..........Nas-Port-Id
89..........cui
95..........Nas-Ipv6-Addr
96..........Framed-Interface-Id
97..........Framed-Ipv6-Prefix

2-21

Command Reference

RADIUS Commands(beta)

98..........Login-Ipv6-Host
99..........Framed-Ipv6-Route100..........Framed-Ipv6-Pool
168..........Framed-Ipv6-Addr

Platform
Description

N/A

2.24 show radius auth statistics
Use this command to display RADIUS authentication statistics.
show radius auth statistics

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode/Privileged EXEC mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays RADIUS authentication statistics.

ExamplesRuijie#show radius auth statistics
Authentication Servers:
Server Index..................................... 1
Server Address................................... 192.168.1.1
Server Port...................................... 1812
Msg Round Trip Time.............................. 0 (msec)
First Requests................................... 0
Retry Requests................................... 0
Accept Responses................................. 0
Reject Responses................................. 0
Challenge Responses.............................. 0
Malformed Msgs................................... 0
Bad Authenticator Msgs........................... 0
Pending Requests................................. 0

2-22

Command Reference

RADIUS Commands(beta)

Timeout Requests................................. 0
Unknowntype Msgs................................. 0
Other Drops...................................... 0

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.25 show radius group
Use this command to display RADIUS server group configuration.
show radius group

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode/Privileged EXEC mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays RADIUS server group configuration.

ExamplesRuijie#show radius group==========Radius group radius==========
Vrf:not-set
Server:192.168.1.1
Server key:ruijie
Authentication port:1812
Accounting port:1813
State:Active

RG-S29 series do not support the VRF parameter. The above example is for reference purpose.
Please take the actual device as standard.

2-23Command Reference

RelatedCommands

Platform

RADIUS Commands(beta)

Command

Description

N/A

N/A

N/A

Description

2.26 show radius parameter
Use this command to display global RADIUS server parameters.
show radius parameter

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode/Privileged EXEC mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays global RADIUS server parameters.

ExamplesRuijie# show radius parameter
Server Timout:

5 Seconds

Server Deadtime: 0 Minutes
Server Retries: 3
Server Dead Critera:

RelatedCommands

PlatformTime:

10 Seconds

Tries:

10

Command

Description

N/A

N/A

N/A

Description

2-24

Command Reference

RADIUS Commands(beta)

2.27 show radius server
Use this command to display the configuration of the RADIUS server.
show radius server

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the configuration of the RADIUS server.

ExamplesRuijie# show radius server
Server IP:

192.168.4.12

Accounting Port: 23
Authen Port:

77

Test Username:viven

Test Idle Time:

10 Minutes

Test Ports:

AuthenServer State:

ActiveCurrent duration 765s, previous duration 0s
Dead: total time 0s, count 0
Statistics:
Authen: request 15, timeouts 1
Author: request 0, timeouts 0
Account: request 0, timeouts 0Server IP:

192.168.4.13

Accounting Port: 45
Authen Port:

74

Test Username:<Not Configured>

Test Idle Time:

60 Minutes

Test Ports:

Authen and AccountingServer State:

ActiveCurrent duration 765s, previous duration 0s

2-25

Command Reference

RADIUS Commands(beta)

Dead: total time 0s, count 0
Statistics:
Authen: request 0, timeouts 0
Author: request 0, timeouts 0
Account: request 20, timeouts 0

RelatedCommands

Command

Description

radius-server hostDefines the RADIUS security server.
Defines the number of RADIUS packet

radius-server retransmit

retransmissions.
Defines a shared password for the RADIUS

radius-server key

server.
Defines the packet transmission timeout.

radius-server timeout

Platform

N/A

Description

2.28 show radius vendor-specificUse this command to display the configuration of the private vendors.
show radius vendor-specificParameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the configuration of the private vendors.

ExamplesRuijie#show radius vendor-specificidvendor-specifictype-value----- -------------------- ---------1

max-down-rate

12

port-priority

2

2-26

Command Reference

RADIUS Commands(beta)

3

user-ip3

4vlan-id4

5

last-supplicant-vers 5ion

6

net-ip6

7

user-name78

password

8

9file-directory

9

10

file-count10

11

file-name-0

11

12

file-name-1

12

13

file-name-2

13

14

file-name-3

14

15

file-name-4

15

16

max-up-rate16

17

current-supplicant-version 17

18

flux-max-high32

18

19

flux-max-low32

19

20

proxy-avoid

20

21

dialup-avoid

21

22

ip-privilege

22

23

login-privilege

4226

ipv6-multicast-addre 79
ss

27

ipv4-multicast-addre 87
ssRelatedCommands

Command

Description

radius-server hostDefines the RADIUS security server.
Defines the number of RADIUS packet

radius-server retransmit

retransmissions.
Defines a shared password for the RADIUS

radius-server key

server.
Defines the packet transmission timeout.

radius-server timeout

Platform

N/A

Description

2-27

Command Reference

TACACS+ Commands(beta)

3 TACACS+ Commands(beta)
3.1 aaa group server tacacs+
Use this command to configure different groups of TACACS+ server hosts.
Use the no form of this command to remove a specified TACACS server group.
aaa group server tacacs+ group_nameno aaa group server tacacs+ group_name
Parameter
Description

Parameter

Description

group_name

TACACS+ server group name, which cannot be radius or tacacs+
The two names are the built-in group name.

Defaults

No TACACS+ server group is configured.

Command

Global configuration mode

Mode

Usage Guide

After you group different TACACS+ servers, the tasks of authentication, authorization and accounting
can be implemented by different server groups.

Configuration

The following example configures a TACACS+ server group named tac1, and configures a TACACS+

Examplesserver with IP address 1.1.1.1 in this group:
Ruijie(config)#aaa group server tacacs+ tac1
Ruijie(config-gs-tacacs+)# server 1.1.1.1

RelatedCommands

Command

Description
Configures server list of TACACS+ server

serverPlatformgroup.

N/A

Description

3.2 ip tacacs source-interface
Use this command to use the IP address of a specified interface for all outgoing TACACS+ packets.
Use the no form of this command to disable use of the specified interface IP address.

3-1

Command Reference

TACACS+ Commands(beta)

ip tacacs source-interface interface-nameno ip tacacs source-interface interface-nameParameter
Description

Parameter

Description

interface-name

Interface for the outgoing TACACS+ packets

Defaults

The source IP address of TACACS+ packets is set on the network layer.

Command

Global configuration mode

Mode

Usage Guide

To decrease the work of maintaining massive NAS messages in TACACS+ server, use this command
to use the IP address of a specified interface for all outgoing TACACS+ packets.
This command specifies the primary IP address of the specified interface as the source address of
TACACS+ packets on Layer 3 devices.

Configuration

The following example specifies the IP address of GigabitEthernet 0/1 for the outgoing TACACS+

Examplespackets.
Ruijie(config)# ip tacacs source-interface gigabitEthernet 0/1

RelatedCommands

Platform

Command

Description

tacacs-server hostDefines a TACACS+ server.

ip address

Configures the IP address of an interface.

N/A

Description

3.3 server
Use this command to configure the IP address of the TACACS+ server for the group server.
Use the no form of this command to remove the TACACS+ server.
server { ipv4-address | ipv6-address }no server { ipv4-address | ipv6-address }Parameter
Description

Parameter

Description

ipv4-address

IPv4 address of the TACACS+ server

ipv6-address

IPv6 address of the TACACS+ server

3-2

Command Reference

TACACS+ Commands(beta)

Defaults

No TACACS+ server is configured by default.

Command

TACACS+ server group configuration mode

Mode

Usage Guide

You must configure the aaa group server tacacs+ command before configuring this command.
To configure server address in TACACS+ group server, you must use the tacacs-server hostcommand in global configuration mode.
If there is no response from the first host entry, the next host entry is tried.

Configuration

The following example configures a TACACS+ server group named tac1 and a TACACS+ server

Examplesaddress 1.1.1.1 in this group.
Ruijie(config)#aaa group server tacacs+ tac1
Ruijie(config-gs-tacacs+)# server 1.1.1.1

RelatedCommands

Platform

Command

Description

aaa group server tacacs+

Configures a TACACS+ server group.

N/A

Description

3.4 show tacacs
Use this command to display the TACACS+ server configuration.
show tacacs

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration/Interface configuration mode

Mode

Usage Guide

N/A

3-3

Command Reference

TACACS+ Commands(beta)

Configuration

The following example displays the TACACS+ server configuration.

ExamplesRuijie# show tacacs
Tacacs+ Server : 172.19.192.80/49
Socket Opens: 0
Socket Closes: 0
Total Packets Sent: 0
Total Packets Recv: 0
Reference Count: 0

RelatedCommands

Platform

Command

Description

tacacs-server hostDefines a TACACS+ secure server host.

N/A

Description

3.5 tacacs-server hostUse this command to configure a TACACS+ host.
Use the no form of this command to remove the TACACS+ host.
tacacs-server host {ipv4-address | ipv6-address} [ port integer ] [ timeout integer ] [ key [ 0 | 7 ]text-string ]no tacacs-server host { ip-address | ipv6-address }Parameter
Description

Parameter

Description

ip-address

IPv4 address of the TACACS+ host

ipv6-address

IPv6 address of the TACACS+ hostport integer

Port number of the server. The range is from 1 to 65,535. The default
is 49.

timeout integer

Timeout time of TACACS+ host. The range is from 1 to 1,000.

key string

Configures an authentication and encryption key. The value can be 0
or 7.
0 indicates no encryption, while 7 indicates simple encryption. The
default is 0.

Defaults

No TACACS+ host is specified by default.

Command

Global configuration mode

3-4

Command Reference

TACACS+ Commands(beta)

Mode

Usage Guide

The TACACS+ host must be configured to implement AAA security service You can use thiscommand to configure one or multiple TACACS+ hosts.

Configuration

The following example configures a TACACS+ host.

ExamplesRuijie(config)# tacacs-server host 192.168.12.1

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

3.6 tacacs-server key
Use this command to configure the authentication encryption key used for TACACS+
communications between the access server and the TACACS+ server.
Use the no form of this command to remove the authentication encryption key.
tacacs-server key [ 0 | 7 ] string
no tacacs-server key

Parameter
Description

Parameter

Description

stringKey string

0|7

Encryption type of key
0 indicates no encryption; 7 indicate simple encryption.

Defaults

No authentication encryption key is configured by default.

Command

Global configuration mode

Mode

Usage Guide

Use command to configure a global authentication and encryption key for TACACS+ communication.
Use the key parameter in the tacacs-server host command to configure a server-based key.

Configuration

The following example defines the authentication encryption key of TACACS+ server as aaa:

ExamplesRuijie(config)# tacacs-server key aaa

3-5Command Reference

RelatedCommands

Platform

TACACS+ Commands(beta)

Command

Description

tacacs-server hostDefines a TACACS+ host.

N/A

Description

3.7 tacacs-server timeout
Use this command to set the interval for which the server waits for a server host to reply. Use the noform of this command to restore the default timeout interval.
tacacs-server timeout seconds
no tacacs-server timeout

Parameter
Description

Parameter

Description

seconds

Timeout interval in the range from 1 to 1,000 in the unit of seconds

Defaults

The default is 5 seconds.

Command

Global configuration mode

Mode

Usage Guide

Use command to configure a global timeout interval. Use the timeout parameter in the tacacs-server
host command to configure a server-based interval.

Configuration

The following example configures the timeout interval to 10 seconds.

ExamplesRuijie(config)# tacacs-server timeout 10

RelatedCommands

Platform

Command

Description

tacacs-server hostDefines a TACACS+ secure server host.

N/A

Description

3-6

Command Reference

Global IP-MAC Binding Commands(beta)

4 Global IP-MAC Binding Commands(beta)
4.1 address-bind
Use this command to configure global IP-MAC address binding. Use the no form of this command torestore the default setting.
address-bind ip-address mac-addressno address-bind ip-address

Parameter

Parameter

Description

Description

ip-address

IPv4 address to be boundmac-address

MAC address to be boundDefaults

N/A

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example configures global IP-MAC address binding.

ExamplesRuijie# configure terminal
Ruijie(config)# address-bind 192.168.5.1 00d0.f800.0001

RelatedCommands

Platform

Command

Description
Displays the IP address-MAC address binding

show address-bindtable.

N/A

Description

4.2 address-bind install
Use this command to enable a binding policy globally. Use the no form of this command to restore thedefault setting.
address-bind installno address-bind install

Parameter

Parameter

Description

4-1

Command Reference

Description

N/A

Defaults

N/A

Command

Global configuration mode

Global IP-MAC Binding Commands(beta)

N/A

Mode

Usage Guide

If you bind an IP address to a MAC address, run this command to make the installation policy takeeffect.

Configuration

The following example enables a binding policy.

ExamplesRuijie# configure terminal
Ruijie(config)# address-bind 3.3.3.3 00d0.f811.1112
Ruijie(config)# address-bind install

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

4.3 address-bind uplink
This command is used to configure the exception port. Use the no form of this command to restore
the default setting.
address-bind uplink interface-id
no address-bind uplink interface-id

Parameter

Parameter

Description

Description

interface-id

Switching port or layer 2 aggregate port.

Defaults

All ports are non-exception ports by default.

Command

Global configuration mode.

Mode

Usage Guide

If you have bound an IP address and a MAC address, the switch will discard the packets that havethe same source IP address but different source MAC address.
If the port is an exceptional port and is installed (see address-bind install), this binding policy does nottake effect.

4-2

Command Reference

Global IP-MAC Binding Commands(beta)

Configuration

The following example configures the exception port.

ExamplesRuijie# configure terminal
Ruijie(config)# address-bind uplink gigabitethernet 0/1

RelatedCommand

Description

show address-bind uplink

Displays the exceptional port of address binding.

Commands

Platform

N/A

Description

4.4 show address-bind
Use this command to display global IP address-MAC address binding.
show address-bind

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example displays global IPv4 address-MAC address binding.

ExamplesRuijie# show address-bind
Total Bind Addresses in System : 1

RelatedIP Address

Binding MAC Addr-------------------------------

192.168.5.1

00d0.f800.0001

Field

Description

Total Bind Addresses in System

IPv4 address-MAC address binding count

IP Address

Bound IP address

Binding MAC Addr

Bound MAC address

Command

Description

4-3

Command Reference

Global IP-MAC Binding Commands(beta)

Commands

address-bind

Platform

N/A

Enables IP address-MAC address binding.

Description

4.5 show address-bind uplink
Use this command to display the exception port.
show address-bind uplink

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

Command

N/A

mode

Usage Guide

N/A

Configuration

The following example displays the exception port.

ExamplesRuijie# show address-bind uplink
Port

State

---------- --------Gi0/1

EnabledDefault

Disabled

Field

Description

Port

Short for exception ports. All ports are
non-exception ports by default.

State

Indicates whether the port is exception port.
State Enabled indicates that it is an exception
port while state Disabled indicates that it it not.

RelatedCommand

Description

Commands

address-bind uplink

Sets the exception port.

Platform

N/A

Description

4-4Command Reference

Password-Policy Commands

5 Password-Policy Commands
5.1 password policy life-cycle
Use this command to set the password lifecycle. Use the no form of this command to restore thedefault setting.
password policy life-cycle days
no password policy life-cycle

Parameter
Description

Parameter

Description
Sets the password lifecycle, in the range from 1 to 65535 in the unit of

days

days.

Defaults

No password lifecycle is set by default.

Command

Global configuration mode

Mode

Usage Guide

This command is used to set the password lifecycle. After the password lifecycle expires, the system
reminds you to change the password when you login next time.
This function is valid for the global password (the enable password and the enable secretcommands) and the local user password (the username name password password command)
while not valid for the password in line mode.

Configuration

The following example sets the password lifecycle to 90 days.

ExamplesRuijie(config)# password policy life-cycle 90

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

5.2 password policy min-size
Use this command to set the minimum length of the password. Use the no form of this command to

5-1

Command Reference

Password-Policy Commands

restore the default setting.
password policy min-size lengthno password policy min-size

Parameter
Description

Parameter

Description

lengthSets the minimum length of the password, in the range from 1 to 31.

Defaults

No minimum length of the password is set by default.

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to set the minimum length of the password,
This function is valid for the global password (the enable password and the enable secretcommands) and the local user password (the username name password password command)
while not valid for the password in line mode.

Configuration

The following example sets the minimum length of the password to 8.

ExamplesRuijie(config)# password policy min-size 8

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

5.3 password policy no-repeat-times
Use this command to ban the use of passwords used in the past several times. Use the noform of this command to restore the default setting.
password policy no-repeat-times times
no password policy no-repeat-times

Parameter
Description

Parameter

times

Description
The past several times when passwords are configured, in therange from 1 to 31.

5-2Command Reference

Password-Policy Commands

Defaults

This function is disabled by default.

Command Mode

Global configuration mode

Usage Guide

After this function is enabled, passwords used in the past several times are recorded. If the
new password has been used, the alarm message is displayed and password configuration
fails.
This command is used to set the maximum number of password entries. When the actual
number of password entries exceeds the configured number, the new password overwrites
the oldest password.

This function is valid for the global password (the enable password and the enablesecret commands) and the local user password (the username name password
password command) while not valid for the password in line mode.

Configuration

The following example bans the use of passwords used in the past five times.

ExamplesRuijie(config)# password policy no-repeat-times 5

Related Commands

Command

Description

N/A

N/A

5.4 password policy strong
Use this command to enable strong password check.
password policy strong
no password policy strong

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

If the following two kinds of passwords are set not matching the strength policy, the alarm message isdisplayed.

5-3Command Reference

Password-Policy Commands

1.

The password the same as the username.

2.

The simple password containing only characters or numbers.
This function is valid for the global password (the enable password and the enable secretcommands) and the local user password (the username name password password command)
while not valid for the password in line mode.

Configuration

The following example configures the strong password check.

ExamplesRuijie(config)# password policy strong

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.7 service password-encryption
Use this command to encrypt a password. Use the no form of this command to restore default setting.
service password-encryption

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

This command is disabled by default. Various passwords are displayed in plain text, unless they are
encrypted. After you run the service password-encryption and show running or write command tosave your configuration, the password changes into cipher text. If you disable the command, thepassword in cipher text cannot be restored to plain text.

Configuration

The following example encrypts the password:

ExamplesRuijie(config)# service password-encryption

RelatedCommand

Description

5-4

Command Reference

Password-Policy Commands

Commands
Sets passwords of different privileges.

enable password

Platform
Description

N/A

5.5 show password policy
Use this command to display the password security policy set by the user.
show password policy

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to display the password security policy set by the user.

Configuration

The following example displays the password security policy set by the user.

ExamplesRuijie#show password policy
Global password policy configurations:
Password encryption:

EnabledPassword strong-check:

EnabledPassword min-size:

Enabled (6 characters)

Password life-cycle:

Enabled (90 days)

Password no-repeat-times:

Enabled (max history record: 5)

Field

Description

Password encryption

Whether to encrypt the password.

Password strong-check

Whether to enable password strong-check.

Password min-size

Whether to set the minimum length of thepassword.

Password life-cycle

Whether to set the password lifecycle.

Password no-repeat-times

RelatedCommands

Command

Description

5-5Command Reference

Password-Policy Commands

N/A

Platform
Description

N/A

N/A

5-6

Command ReferencePort Security Commands(beta)

6 Port Security Commands(beta)
6.1 show port-security
Use this command to display the port security configuration and the secure address.
show port-security [ address [ interface interface-id ] | binding [ interface interface-id ] | interface
interface-id | all ]Parameter
Description

Parameter

Description
Displays all secure addresses, or the secure address of theaddress

specified port.
Displays all port security bindings, or the port security bindings ofbinding

the specified port.

interface interface-id

Displays the port security configuration of the specified port.

all

Displays all valid secure addresses and valid port security bindings.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage

To display all port security configuration and violation management, execute the command without any

Guideparameter. To display the security configuration, the secure address, or the port security binding of thespecified interface, execute the command with the corresponding parameter.

Configurati

The following example displays the port security statistics.

on

Ruijie# show port-security

ExamplesNO. SecurePort MaxSecureAddr CurrentAddr CurrentIpBind CurrentIpMacBind
SecurityAction(Count)(Count)(Count)(Count)---- ---------- ------------- ----------- ------------- ----------------------------1

Gi0/1

128

2

2

1

protect-------------------------------------------------------------------------------------Total secure addresses in System : 2
Total secure bindings

in System : 3

6-1

Command ReferencePort Security Commands(beta)

Field

Description

NO.

Serial number.

Secure Port

Port name

MaxSecureAddr(count)

The maximum number of secure addresses on
the port.

CurrentAddr(count)

The current number of secure addresses on the
port.

CurrentIpBind (count)

The current number of IP addresses bindings on
the port.

CurrentIpMacBind (count)

The current number of IP-MAC address bindingson the port.

Security Action

Violation management.

Total secure addresses in System

The total number of secure addresses on thedevice.

Total secure bindings in System

The total number of port security bindings on thedevice,

The following example displays the port security configuration on interface Gigabitethernet 0/1.
Ruijie# show port-security interface gigabitethernet 0/1
Interface: GigabitEthernet 0/1

Port status: downPort Security: enabled

SecureStatic address aging: disabled

Sticky dynamic address: disabled

Violation mode

: protect

Maximum MAC Addresses: 128

Total MAC Addresses: 2

Configured MAC Addresses: 2

Dynamic MAC Addresses: 0

Sticky MAC Addresses: 0

Total security binding: 3

IPv4-ONLY Binding Addresses : 1
IPv6-ONLY Binding Addresses : 1
IPv4-MAC Binding Addresses: 1

IPv6-MAC Binding Addresses: 0Aging time(min)

: 0

Field

Description

Interface

Port name.

Port status

Port status.

Port Security

Displays whether the port security is enabled.

6-2

Command ReferencePort Security Commands(beta)

SecureStatic address aging

Displays whether the static secure address aging
is enabled.

Sticky dynamic address

Displays whether the dynamic secure address isconverted to the sticky secure address,

Violation mode

Port violation management.

Maximum MAC Addresses

The maximum number of secure addresses on
the port.

Total MAC Addresses

The number of valid secure addresses on the
port.

Configured MAC Addresses

The number of static secure addresses.

Dynamic MAC Addresses

The number of dynamic secure addresses.

Sticky MAC Addresses

The number of sticky secure addresses,

Total security binding

The number of valid port security bindings.

IPv4-ONLY Binding Addresses

The number of IPv4 addresses bindings.

IPv6-ONLY Binding Addresses

The number of IPv6 addresses bindings.

IPv4-MAC Binding Addresses

The number of IPv4-MAC address bindings.

IPv6-MAC Binding Addresses

The number of IPv6-MAC address bindings.

Aging time(min)The aging time of the secure address.

The following example displays all secure addresses on the device.
Ruijie# show port-security address
NO. VLAN MacAddress

PORT

TYPE

RemainingAge(mins)

STATUS---- ----- --------------- ------------------------- --------------------------- --------1

100d0.f800.073c GigabitEthernet 0/1

Configured--

00d0.f800.073d GigabitEthernet 0/1

Configured--

active21activeField

Description

NO.

Serial number.

Vlan

VLAN ID.

Mac Address

MAC address.

Port

Port name.

Type

Secure address type.

Remaining Age(mins)

The aging time of the secure address.

STATUS

The secure address status.

The following example displays all port security bindings on the device.

6-3

Command ReferencePort Security Commands(beta)

Ruijie# show port-security binding
NO. VLAN MacAddress

PORT

IpAddress

FilterType FilterStatus---- ---- -------------- ---------- ------------------------------------------------- -----------1

100d0.f800.073c Gi0/1

192.168.12.202

ipv4-mac

active
2

--

--

Gi0/1

192.168.0.1

ipv4-only

--

Gi0/1

ffaa:ddcc::1

ipv6-only

active
3

--

activ

RelatedCommands

Platform

Field

Description

NO.

Serial number.

Vlan

VLAN ID.

Mac Address

MAC address.

Port

Port name.

IpAddress

IP address.

FilterType

The filtering type of the port security binding.

FilterStatus

The status of the port security binding.

Command

Description

N/A

N/A

N/A

Description

6.2 switchport port-security
Use this command to configure port security and the way to deal with violation.
Use the no form of this command to restore the default setting.
switchport port-security [ violation { protect | restrict | shutdown } ]no switchport port-security [ violation ]Parameter
Description

Parameter

Description

protect

Discards the packets breaching security.

restrict

Discards the packets breaching security and sends the Trap
message.

shutdown

Discards the packets breaching the security, sends the Trap

6-4

Command ReferencePort Security Commands(beta)

message and disables the interface.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

With port security, you can strictly control the input on a specific port by restricting access to the MAC
address and IP address (optional) of the port on the switch. After you configure some secure
addresses for the port security-enabled port, only the packets from these addresses can be
forwarded. In addition, you can also restrict the maximum number of secure addresses on a port. If
you set the maximum value to 1 and configure one secure address for this port, the workstation(whose address is the configured secure Mac address) connected to this port will occupy all the
bandwidth of this port exclusively.
If the violation handling mode is changed after violation occurs, the new mode takes effect only
after the violation mode is restarted.

Configuration

The following example enables port security on interface GigabitEthernet 0/1, and the way to deal

Exampleswith violation is shutdown:
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security violation
shutdown

RelatedCommands

Platform

Command

Description

show port-security

Displays port security settings.

N/A

Description

6.3 switchport port-security aging
Use this command to set the aging time for all secure addresses on an interface.
Use the no form of this command to restore the default setting.
switchport port-security aging { static | time time }no switchport port-security aging { static | time }Parameter
Description

Parameter

Description

6-5

Command ReferencePort Security Commands(beta)

staticApplies the aging time to both manually configured secure addresses
and automatically learned addresses. Otherwise, apply it to only theautomatically learned secure addresses.

time time

Specifies the aging time for the secure address on this port. Its range
is 0-1,440 in minutes. If you set it to 0, the aging function is disabledactually.

Defaults

No secure address is aged by default.

Command

Interface configuration mode

Mode

Usage Guide

In interface configuration mode, use the no switchport port-security aging time command todisable the aging for security addresses on the port. Use the no switchport port-security aging
static command to apply the aging time to only the dynamically learned security address.
Use the show port-security command to display configuration.
When both port security and 802.1X authentication functions are enabled, 802.1X clients must get
re-authenticated for network access once the secure addresses are aged.
To enable this function, you need to set the maximum number of secure addresses. In this way,
you can make the switch automatically add or delete the secure addresses on the interface.

Configuration

The following example sets the aging time for all secure addresses on interface GigabitEthernet 0/1

Examplesto eight minutes.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security aging time 8
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security aging static
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Platform

Command

Description

show port-security

Displays port security settings.

N/A

Description

6.4 switchport port-security binding
Use these commands to configure secure address binding manually in the interface configuration
mode through performing the source IP address plus source MAC address binding or only the source

6-6Command ReferencePort Security Commands(beta)

IP address binding. With this binding configured, only the packets match the binding secure address
could enter the switch, others will be discarded.
Use the no form of these commands to remove the binding addresses.
switchport port-security binding [ mac-address vlan vlan-id ] ipv4-addresssno switchport port-security binding [ mac-address vlan vlan-id ] ipv4-address

Parameter
Description

Parameter

Description

mac-address

The source MAC addresses to be boundvlan-id

VLAN ID of the binding source MAC address

ipv4-address

Binds IPv4 addresses.

Defaults

N/A

Command

Interface configuration mode

Mode

Usage Guide

1. For packets complying with IP/IP-MAC binding, they can be forwarded only if MAC addresses are
secure addresses.
2. For dynamic secure addresses, packets cannot be forwarded before bound even if their addresses
comply with the binding list.
Network is often accessible to static users with secure addresses without authorization. If
authorization is configured, these users must comply with it.

Configuration

The following example binds the IP address 192.168.1.100 on interface GigabitEthernet 0/10:

ExamplesRuijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/10
Ruijie(config-if-GigabitEthernet 0/10)# switchport port-security binding
192.168.1.100
Ruijie(config-if-GigabitEthernet 0/10)# end

The following example binds the IP address 192.168.1.100 and MAC address 00d0.f800.5555 with
VLAN ID 1 on interface GigabitEthernet 0/10.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/10
Ruijie(config-if-GigabitEthernet 0/10)# switchport port-security binding
00d0.f800.5555 vlan 1 192.168.1.100
Ruijie(config-if-GigabitEthernet 0/10)# end

RelatedCommand

Description

6-7

Command ReferencePort Security Commands(beta)

Commands
show port-security

Displays port security settings.

switchport port-security

Enables the port-security.

switchport port-security interface binding

Platform

Configures the secure address binding in
Global configuration mode.

switchport port-security mac-address

Sets the static secure address.

switchport port-security aging

Sets the aging time for secure address.

N/A

Description

6.5 switchport port-security interface binding
Use these commands to configure secure address binding manually in the privileged EXEC modethrough performing the source IP address plus source MAC address binding or only the source IP
address binding. With this binding configured, only the packets match the binding secure address
could enter the switch, others will be discarded.
Use the no form of these commands to remove the binding addresses.
switchport port-security interface interface-id binding [ mac-address vlan vlan-id ] ipv4-addresssno switchport port-security interface interface-id binding [ mac-address vlan vlan-id ]ipv4-address

Parameter
Description

Parameter

Description

interface-id

Binds interface ID.

mac-address

Binds source MAC address.

vlan-id

VLAN ID of the binding source MAC address

ipv4-address

Binds IPv4 address.

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

1. For packets complying with IP/IP-MAC binding, they can be forwarded only if MAC addresses are
secure addresses.
2. For dynamic secure addresses, packets cannot be forwarded before bound even if their addresses
comply with the binding list.

6-8

Command ReferencePort Security Commands(beta)

Configuration

The following example binds the IP address 192.168.1.100 on the interface GigabitEthernet 0/10.

ExamplesRuijie# configure terminal
Ruijie(config)# switchport port-security interface gigabitethernet 0/10
binding 192.168.1.100
Ruijie(config)# end

The following example binds the IP address 192.168.1.100 and MAC address 00d0.f800.5555 with
VLAN ID 1 on the interface g 0/10.
Ruijie# configure terminal
Ruijie(config)# switchport port-security interface gigabitethernet 0/10
binding 00d0.f800.5555 vlan 1 192.168.1.100
Ruijie(config)# end

RelatedCommands

Command

Description

show port-security

Displays port security settings.

switchport port-security

Enables the port-security.
Configures the secure address binding inswitchport port-security binding

Platforminterface configuration mode.

switchport port-security mac-address

Sets the static secure address.

switchport port-security aging

Sets the aging time for secure address.

N/A

Description

6.6 switchport port-security interface mac-address
Use this command to configure the static secure address.
Use the no form of this command to remove the configuration.
switchport port-security interface interface-id mac-address mac-address [ vlan vlan-id ]no switchport port-security interface interface-id mac-address mac-address [ vlan vlan-id ]Parameter
Description

Parameter

Description

interface-id

Interface ID

mac-address

Static secure address

vlan-id

VLAN ID of the MAC address
The configuration of vlan-id is only supported on the TRUNK
port.

6-9

Command Reference

Defaults

N/A

Command

Glocal configuration mode

Port Security Commands(beta)

Mode

Usage Guide

N/A

Configuration

The following example sets the static secure address and VLAN ID of TRUNK port 10 to

Examples

00d0.f800.5555 and 2 respectively.
Ruijie# configure terminal
Ruijie(config)# switchport port-security interface gigabitethernet 0/10
mac-address 00d0.f800.5555 vlan 2
Ruijie(config)# end

RelatedCommands

Command

Description

show port-security

Displays port security settings.

switchport port-security

Enables the port-security.

switchport port-security binding

Configures the secure address binding.
Sets the static secure address in interface

switchport port-security mac-addressconfiguration mode.
Sets the aging time for the secure address.

switchport port-security aging

Platform

N/A

Description

6.7 switchport port-security mac-address
Use this command to configure the static secure address.
Use the no form of this command to remove the configuration.
switchport port-security mac-address mac-address [ vlan vlan-id ]no switchport port-security mac-address mac-address [ vlan vlan-id ]Parameter
Description

Parameter

Description

mac-address

Static secure MAC address

vlan-id

VLAN ID of the MAC address
The configuration of vlan-id is only supported on the TRUNK

6-10

Command ReferencePort Security Commands(beta)

port.

Defaults

N/A

Command

Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets the static secure address and VLAN ID of TRUNK port 10 to

Examples

00d0.f800.5555 and 2 respectively.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/10
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security mac-address
00d0.f800.5555 vlan 2
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Command

Description

show port-security

Displays port security settings.

switchport port-security

Enables the port-security.

switchport port-security binding

Configures the secure address binding.

switchport port-security interface mac-address

EXEC mode.
Sets the aging time for the secure address.

switchport port-security aging

Platform

Sets the static secure address in privileged

N/A

Description

6.8 switchport port-security mac-address sticky
Use this command to configure the Sticky MAC secure address.
Use the no form of this command to restore the default setting.
switchport port-security mac-address sticky mac-address [ vlan vlan-id ]no switchport port-security mac-address sticky mac-address [ vlan vlan-id ]Use the command without parameters to enable the Sticky MAC address learning.
Use the no form of this command to disable the Sticky MAC address learning.
switchport port-security mac-address sticky
no switchport port-security mac-address sticky

6-11

Command Reference

Parameter
Description

Port Security Commands(beta)

Parameter

Description

mac-address

Static secure address

vlan-idVlan ID of the MAC address
The configuration of vlan-id is only supported on the TRUNK
port.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

Sticky MAC addresses, either static or dynamic, are special addresses free from aging.

Configuration

The following example sets the MAC address and VLAN ID of TRUNK port 10 to 00d0.f800.5555 to 2

Examplesrespectively.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/10
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security mac-address
00d0.f800.5555 vlan 2
Ruijie(config-if-GigabitEthernet 0/1)# end

The following example enables the Sticky MAC address learning on interface GigabitEthernet 0/10.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/10
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security mac-address
stickyRuijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Command

Description

show port-security

Displays port security settings.

switchport port-security

Enables the port-security.

switchport port-security binding

Configures the secure address binding.

switchport port-security interface mac-address

Sets the static secure address in privileged
EXEC mode.
Sets the static secure address in interface

switchport port-security mac-addressconfiguration mode.
Sets the aging time for the secure address.

switchport port-security aging

6-12

Command Reference

Platform

Port Security Commands(beta)

N/A

Description

6.9 switchport port-security maximum
Use this command to set the maximum number of port secure addresses.
Use the no form of this command to restore the default setting.
switchport port-security maximum value
no switchport port-security maximum

Parameter
Description

Parameter

Description

value

Maximum number of the secure address, in the range from 1 to 64.

Defaults

The default is 128.

Command

Interface configuration mode

Mode

Usage Guide

The number of the secure address contains the sum of static secure address and dynamically learnt
secure address, 64 by default.
If the number of the secure address you set is less than current number, it will prompt this setting
failure.

Configuration

The following example sets the maximum number of the secure address to 2 for interface

ExamplesGigabitEthernet 0/10.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/10
Ruijie(config-if-GigabitEthernet 0/1)# switchport port-security maximum 2
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Command

Description

show port-security

Displays port security settings.

switchport port-security

Enables the port-security.

switchport port-security binding

Configures the secure address binding.
Sets the static secure address in the interface

switchport port-security mac-addressconfiguration mode.
Sets the aging time for the port secure address.

switchport port-security aging

6-13

Command Reference

Platform

Port Security Commands(beta)

N/A

Description

6-14

Command Reference

Storm Control Commands

7 Storm Control Commands
7.1 show storm-control
Use this command to display storm suppression information.
show storm-control [ interface-type interface-number ]Parameter
Description

Parameterinterface-type
interface-number

Description

Specifies an interface.

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example displays storm control configuration on GigabitEthernet 0/1.

ExamplesRuijie# show storm-control gigabitethernet 0/1
Interface

Broadcast Control Multicast Control Unicast Control

Action------------------------- ----------------- ------------------------------- -------GigabitEthernet 0/1

RelatedCommands

Platform

1%

50%

1%

Command

Description

storm-control

Enables storm suppression.

N/A

Description

7.2 storm-control
Use this command to enable the storm suppression for unknown unicast packets.
Use the no or default form of this command to restore the default setting.

7-1

none

Command Reference

Storm Control Commands

storm-control unicast [ level percent | pps packets | rate-bps ]no storm-control unicast
default storm-control unicast

Use this command to enable the storm suppression for multicast packets.
Use the no or default form of this command to restore the default setting.
storm-control multicast [ level percent | pps packets | rate-bps ]no storm-control multicast
default storm-control multicast

Use this command to enable the storm suppression for broadcast packets.
Use the no or default form of this command to restore the default setting.
storm-control broadcast [ level percent | pps packets | rate-bps ]no storm-control broadcast
default storm-control broadcast

Parameter
Description

Parameter

Description

level percent

Sets the bandwidth percentage, for example, 20 means 20%.

pps packets

Sets the pps, which means packets per second.

rate-bps

Rate allowed

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

Too many broadcast, multicast or unicast packets received on a port may cause storm and thus slow
network and increase timeout. Protocol stack implementation errors or wrong network configuration
may also lead to such storms.
A device can implement the storm suppression to a broadcast, a multicast, or a unicast storm
respectively. When excessive broadcast, multicast or unknown unicast packets are received, theswitch temporarily prohibits forwarding of relevant types of packets till data streams are recovered to
the normal state (then packets will be forwarded normally).

Configuration

The following example enables the multicast storm suppression on GigabitEthernet 0/1 and sets the

Examplesallowed rate to 4M.
Ruijie(config)# int gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# storm-control multicast 4096

RelatedCommand

Description

7-2

Command Reference

Storm Control Commands

Commands
Displays storm suppression information.

show storm-control

Platform

N/A

Description

7-3

Command Reference

SSH Commands

8 SSH Commands
8.1 crypto key generate
Use this command to generate a public key to the SSH server.
crypto key generate { dsa | rsa }Parameter

Parameter

Description

Description

rdsa

Generates a DSA key.

drsa

Generates an RSA key.

Defaults

By default, the SSH server does not generate a public key.

Command

Global configuration mode

Mode

Usage Guide

When you need to enable the SSH SERVER service, use this command to generate a public key on
the SSH server and enable the SSH SERVER service by command enable service ssh-server at
the same time. SSH 1 uses the RSA key; SSH 2 uses the RSA or DSA key. Therefore, if a RSA key
has been generated, both SSH1 and SSH2 can use it. If only a DSA key is generated, only SSH2 canuse it.
Only DSA/RSA authentication is available for one connection. Also, the key algorithm may differ
in different client. Thus, it is recommended to generate both RSA and DSA keys so as to ensure
connection with the portal server.
RSA has a minimum modulus of 512 bits and a maximum modulus of 2,048 bits; DSA has aminimum modulus of 360 bits and a maximum modulus of 2,048 bits. For some clients like SCP
clients, a 768-bit or more key is required. Thus, it is recommended to generate the key of 768
bits or more.
A key can be deleted by using the no crypto key generate command. The no crypto key
zeroize command is not available.

Configuration

The following example generates an RSA key to the SSH server.

ExamplesRuijie# configure terminal
Ruijie(config)# crypto key generate rsa

RelatedCommand

Description

Commands

show ip ssh

Displays the current status of the SSH server.

crypto key zeroize { dsa | rsa }Deletes DSA and RSA keys and disables the SSH server

8-1

Command Reference

SSH Commands

function.

Platform

N/A

Description

8.2 crypto key zeroize
Use this command to delete a public key to the SSH server.
crypto key zeroize { dsa | rsa }Parameter

Parameter

Description

Description

rdsa

Deletes the DSA key.

drsa

Deletes the RSA key.

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

This command deletes the public key to the SSH server. After the key is deleted, the SSH serverstate becomes DISABLE. If you want to disable the SSH server, run the no enable service
ssh-server command.

Configuration

The following example deletes a RSA key to the SSH server.

ExamplesRuijie# configure terminal
Ruijie(config)# crypto key zeroize rsa

RelatedCommand

Description

Commands

show ip ssh

Displays the current status of the SSH server.

crypto key generate { dsa | rsa }Generates DSA and RSA keys.

Platform

N/A

Description

8.3 disconnect ssh
Use this command to disconnect the established SSH connection.
disconnect ssh [ vty ] session-id

Parameter

Parameter

Description

8-2

Command Reference

Description

SSH Commands

vty

Established VTY connection

session-id

ID of the established SSH connection, in the range from 0 to 35

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

You can disconnect a SSH connection by entering the ID of the SSH connection or disconnect a SSH
connection by entering the specified VTY connection ID. Only connections of the SSH type can be
disconnected.

Configuration

The following example disconnects the established SSH connection by specifying the SSH session

ExamplesID.
Ruijie# disconnect ssh 1

The following example disconnects the established SSH connection by specifying the VTY session
ID.
Ruijie# disconnect ssh vty 1

RelatedCommand

Description

Commands

show ssh

Displays the information about the established SSH connection.

clear line vty line_number

Disconnects the current VTY connection.

Platform

N/A

Description

8.4 ip scp server enable
Use this command to enable the SCP server function on a network device.
Use the no form of this command to restore the default setting.
ip scp server enable
no ip scp server enable

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

8-3

Command Reference

SSH Commands

Mode

Usage Guide

Secure Copy (SCP) enables an authenticated user to transfer files to/from a remote device in an
encrypted way, with high security and guarantee.

Configuration

The following example enables the SCP server function.

ExamplesRuijie# configure terminal
Ruijie(config)# ip scp server enable

RelatedCommand

Description

Commands

show ip ssh

Displays the current status of the SSH server.

Platform

N/A

Description

8.5 ip ssh authentication-retries
Use this command to set the authentication retry times of the SSH server.
Use the no form of this command to restore the default setting.
ip ssh authentication-retries retry-times
no ip ssh authentication-retries

Parameter

Parameter

Description

Description

retry-times

Authentication retry times, ranging from 0 to 5

Defaults

The default is 3.

Command

Global configuration mode

Mode

Usage Guide

User authentication is considered failed if authentication is not successful when the configured
authentication retry times on the SSH server is exceeded. Use the show ip ssh command to display
the configuration of the SSH server

Configuration

The following example sets the authentication retry times to 2.

ExamplesRuijie# configure terminal
Ruijie(config)# ip ssh authentication-retries 2

RelatedCommand

Description

Commands

show ip ssh

Displays the current status of the SSH server.

8-4

Command Reference

Platform

SSH Commands

N/A

Description

8.6 ip ssh cipher-mode
Use this command to set the SSH server encryption mode.
Use the no form of this command to restore the default setting.
ip ssh cipher-mode { cbc | ctr | others }no ip ssh cipher-mode

Parameter

Parameter

Description

Description
Encryption mode: CBC (Cipher Block Chaining)

cbc

Encryption algorithm: DES-CBC, 3DES-CBC, AES-128-CBC,
AES-192-CBC, AES-256-CBC, Blow fish-CBC

ctrothersEncryption mode: CTR (Counter)
Encryption algorithm: AES128-CTR, AES192-CTR, AES256-CTR
Encryption mode: Others
Encryption algorithm: RC4

Defaults

All encryption modes are supported by default.

Command

Global configuration mode

Mode

Usage Guide

This command is used to set the SSH server encryption mode.
For Ruijie Networks, the SSHv1 server supports DES-CBC, 3DES-CBC, and Blowfish-CBC; theSSHv2 server supports AES128-CTR, AES192-CTR, AES256-CTR, DES-CBC, 3DES-CBC,
AES-128-CBC, AES-192-CBC, AES-256-CBC, Blowfish-CBC, and RC4. All these algorithms can begrouped into CBC, CTR and Other as shown above.
With the advancement of cryptography study, CBC and Others encryption modes are proved to easily
decipher. It is recommended to enable the CTR mode to raise assurance for organizations andenterprises demanding high security.

Configuration

The following example enables CTR encryption mode.

ExamplesRuijie# configure terminal
Ruijie(config)# ip ssh cipher-mode ctr

Platform

N/A

Description

8-5

Command Reference

SSH Commands

8.7 ip ssh hmac-algorithm
Use this command to set the algorithm for message authentication.
Use the no form of this command to restore the default setting.
ip ssh hmac-algorithm { md5 | md5-96 | sha1 | sha1-96 }no ip ssh hmac-algorithm
Parameter

Parameter

Description

Description

md5

MD5 algorithm

md5-96

MD5-96 algorithm

sha1

SHA1 algorithm

sha1-96

SHA1-96 algorithm

Defaults

SSHv1: all the algorithms are not supported.
SSHv2: all the algorithms are supported.

Command

Global configuration mode

Mode

Usage Guide

Ruijie SSHv1 servers do not support algorithms for message authentication.
For Ruijie Networks, the SSHv1 server does not support message authentication algorithms; theSSHv2 server supports MD5, MD5-96, SHA1, and SHA1-96 algorithms. Set the algorithm on yourdemand.

Configuration

The following example sets the algorithm for message authentication to SHA1.

ExamplesRuijie# configure terminal
Ruijie(config)# ip ssh hmac-algorithm sha1

Platform

N/A

Description

8.8 ip ssh peer
Use this command to associate the public key file and the user name on the client. During client login
authentication, you can specify a public key file based on the user name.
Use the no form of this command to restore the default setting.
ip ssh peer username public-key { dsa | rsa } filename
no ip ssh peer username public-key { dsa | rsa } filename

Parameter

Parameter

Description

Descriptionusername

User name8-6

Command Reference

SSH Commands

filename

Name of a public key filerdsa

The public key is a DSA key

drsa

The public key is a RSA key

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets RSA and DSA key files associated with user test.

ExamplesRuijie# configure terminal
Ruijie(config)# ip ssh peer test public-key rsa flash:rsa.pub
Ruijie(config)# ip ssh peer test public-key dsa flash:dsa.pub

RelatedCommand

Description

Commands

show ip ssh

Displays the current status of the SSH server.

Platform

N/A

Description

8.9 ip ssh time-out
Use this command to set the authentication timeout for the SSH server.
Use the no form of this command to restore the default setting.
ip ssh time-out time
no ip ssh time-out

Parameter
Description

Parameter
time

Defaults

The default is 120 seconds.

Command

Global configuration mode

Description
Authentication timeout, in the range from 1 to 120 in the unit ofseconds

Mode

Usage Guide

The authentication is considered timeout and failed if the authentication is not successful within 120
seconds starting from receiving a connection request. Use the show ip ssh command to display the

8-7Command Reference

SSH Commands

configuration of the SSH server.

Configuration

The following example sets the timeout value to 100 seconds.

ExamplesRuijie# configure terminal
Ruijie(config)# ip ssh time-out 100

RelatedCommand

Description

Commands

show ip ssh

Displays the current status of the SSH server.

Platform

N/A

Description

8.10 ip ssh version
Use this command to set the version of the SSH server.
Use the no form of this command to restore the default setting.
ip ssh version { 1 | 2 }no ip ssh version

Parameter

Parameter

Description

Description

1

Supports the SSH1 client connection request.

2

Supports the SSH2 client connection request.

Defaults

SSH1 and SSH2 are compatible by default.

Command

Global configuration mode

Mode

Usage Guide

This command is used to configure the SSH connection protocol version supported by SSH server.
By default, the SSH server supports SSH1 and SSH2. If Version 1 or 2 is set, only the SSH client of
this version can connect to the SSH server. Use the show ip ssh command to display the current
status of SSH server.

Configuration

The following example sets the version of the SSH server.

ExamplesRuijie# configure terminal
Ruijie(config)# ip ssh version 2

RelatedCommand

Description

Commands

show ip ssh

Displays the current status of the SSH server.

8-8

Command Reference

Platform

SSH Commands

N/A

Description

8.11 show crypto key mypubkey
Use this command to display the information about the public key part of the public key to the SSH
server.
show crypto key mypubkey { dsa | rsa }Parameter

Parameter

Description

Description

rdsa

Displays the DSA key.

drsa

Displays the RSA key.

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode

Mode

Usage Guide

This command is used to show the information about the public key part of the generated public key
on the SSH server, including key generation time, key name, contents in the public key part, etc.

Configuration

The following example displays the information about the public key part of the public key to the SSH

Examplesserver.
Ruijie# show crypto key mypubkey rsa% Key pair was generated at: 7:1:25 UTC Jan 16 2013
Key name: RSA1 private
Usage: SSH Purpose Key
Key is not exportable.
Key Data:
AAAAAwEA AQAAAEEA 2m6H/J+2 xOMLW5MR 8tOmpW1I XU1QItVN mLdR+G7O
Q10kz+4//IgYR0ge 1sZNg32u dFEifZ6D zfLySPqC MTWLfw==% Key pair was generated at: 7:1:25 UTC Jan 16 2013
Key name: RSA private
Usage: SSH Purpose Key
Key is not exportable.
Key Data:
AAAAAwEA AQAAAEEA 0E5w2H0k v744uTIR yZBd/7AM 8pLItnW3 XH3LhEEi
BbZGZvn3
LEYYfQ9s pgYL0ZQf S0s/GY0X gJOMsc6z i8OAkQ==

8-9

Command Reference

SSH Commands

RelatedCommand

Description

Commands

crypto key generate { dsa | rsa }Generates DSA and RSA keys.

Platform

N/A

Description

8.12 show ip ssh
Use this command to display the information of the SSH server.
show ip ssh

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode

Mode

Usage Guide

This command is used to display the information of the SSH server, including version, enablement
state, authentication timeout, and authentication retry times.
Note: If no key is generated for the SSH server, the SSH version is still unavailable even if this SSH
version has been configured.

Configuration

The following example displays the information of the SSH server.

Examples

SSH and SCP disabled:
Ruijie# show ip ssh
SSH Disable - version 1.99
please generate rsa and dsa key to enable SSH
Authentication timeout: 120 secs
Authentication retries: 3
SSH SCP Server: disabled
SSH and SCP enabled:
Ruijie# show ip ssh
SSH Enable - version 1.99
Authentication timeout: 120 secs
Authentication retries: 3
SSH SCP Server: enabled

8-10

Command Reference

SSH Commands

RelatedCommand

Description

Commands

ip ssh version { 1 | 2 }Configures the version for the SSH server.

ip ssh time-out time

Sets the authentication timeout for the SSH server.

ip ssh authentication-retries

Sets the authentication retry times for the SSH server.

Platform

N/A

Description

8.13 show ssh
Use this command to display the information about the established SSH connection.
show ssh

Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode/Global configuration mode

Mode

Usage Guide

This command is used to display the information about the established SSH connection, including
VTY number of connection, SSH version, encryption algorithm, message authentication algorithm,
connection status, and user name.

Configuration

The following example displays the information about the established SSH connection:

ExamplesRuijie# show ssh
Connection Version Encryption

Hmac

CompressState

Username0

1.5 blowfish

1

2.0 aes256-cbc

zlib
hmac-sha1

Session started test

zlib

Session started test

Field Description
Field

Description

Connection

VTY number

Version

SSH version

Encryption

Encryption algorithm

Hmac

Message authentication algorithm

Compress

Compress algorithm

State

Connection state

8-11

Command Reference

SSH Commands

Username

Username

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

8-12

Command Reference

CPU Protection Commands

9 CPU Protection Commands
9.1 clear cpu-protect counters
Use this command to clear the CPP statistics.
clear cpu-protect counters [ device device-num ] [ slot slot-num ]Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

9-1

Command Reference

CPU Protection Commands

Configuration

The following example clears the CPP statistics.

ExamplesRuijie# show cpu-protect | in arp
arp

4

150

4

0

8605

0

Ruijie# clear cpu-protect counters
Ruijie# show cpu-protect | in arp
arp

RelatedCommands

Platform

4

150

3

Command

Description

N/A

N/A

0

4

N/A

Description

9.2 cpu-protect type bandwidth
Use this command to configure the bandwidth of a specific packet.
Use the no form of this command to restore the default setting.
cpu-protect type packet-type bandwidth bandwidth-value
no cpu-protect type packet-type bandwidthParameter
Description

Parameter

Description

packet-type

Packet type, which varies with products

bandwidth-value

An integer number ranges from 0 to 32000 (pps). Indicates the
bandwidth value of the CPU port.

Defaults

The default CPU port bandwidth varies with products.

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets the BPDU bandwidth to 200 pps.

ExamplesRuijie# configure terminal
Ruijie(config)# cpu-protect type bpdu bandwitdth 200
Ruijie(config)# end

9-2

0Command Reference

CPU Protection Commands

Ruijie# #show cpu-protect | in bpdu
bpdu
tunnel-bpdu

RelatedCommands

Platform

10

200

10

0

128

0
0

Command

Description

N/A

N/A

N/A

Description

9.3 show cpu-protect
Use this command to display all CPP configuration and statistics.
show cpu-protect

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

All configuraiton mode

Mode

Usage Guide

Configuration
ExamplesRelatedCommands

Platform

N/A

N/A

Command

Description

N/A

N/A

N/A

Description

9-3

0
0

0
0

0

Command Reference

DHCP Snooping Commands(beta)

10 DHCP Snooping Commands(beta)
10.1 clear ip dhcp snooping binding
Use this command to delete the dynamic user information from the DHCP Snooping binding
database.
clear ip dhcp snooping binding [ ip ] [ mac ] [ vlan vlan-id ] [ interface interface-id ]Parameter
Description

Parameter

DescriptionmacSpecifies the user MAC address to be cleared.

vlan-id

Specifies the ID of the VLAN to be cleared.

ip

Specifies the IP address to be cleared.

interface-id

Specifies the ID of the interface to be cleared.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

Use this command to clear the current dynamic user information from the DHCP Snooping binding
database.
After this command is used, all the DHCP clients connecting interfaces with IP Source Guard
function enabled should request IP addresses again, or they cannot access network.

Configuration

The following example clears the dynamic database information from the DHCP Snooping binding

Examplesdatabase.
Ruijie# clear ip dhcp snooping binding
Ruijie# show ip dhcp snooping binding
Total number of bindings: 0
MacAddress IpAddress Lease(sec) Type VLAN Interface---------- ---------- ---------- -------- ---- ---------

RelatedCommands

Command

Description
Displays the information of the DHCP Snoopingshow ip dhcp snooping binding

binding database.

10-1

Command Reference

Platform

DHCP Snooping Commands(beta)

N/A

Description

10.2 ip dhcp snooping
Use this command to enable the DHCP Snooping function globally.
Use the no form of this command to restore the default setting.
ip dhcp snooping
no ip dhcp snooping

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

The show ip dhcp snooping command is used to display whether the DHCP Snooping function isenabled.

Configuration

The following example enables the DHCP Snooping function.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp snooping

RelatedCommands

Command

Description
Displays the configuration information of DHCP

show ip dhcp snooping

Snooping.
Configures DHCP Snooping enabled VLAN.

ip dhcp snooping vlan

Platform

N/A

Description

10.3 ip dhcp snooping bootp-bind
Use this command to enable DHCP Snooping BOOTP-bind function.
Use the no form of this command to restore the default setting.
ip dhcp snooping bootp-bind

10-2

Command Reference

DHCP Snooping Commands(beta)

no ip dhcp snooping bootp-bind

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

By default, the DHCP Snooping only forwards BOOTP packets. With this function enabled, it can
Snoop BOOTP packets. After the BOOTP client requests an address successfully, the DHCP
Snooping adds the BOOTP user to the static binding database.

Configuration

The following example enables the DHCP Snooping BOOTP-bind function.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp snooping bootp-bind

RelatedCommands

Platform

Command

Description

show ip dhcp snooping

Displays the DHCP Snooping configuration.

N/A

Description

10.4 ip dhcp snooping check-giaddr
Use this command to enable DHCP Snooping to support the function of processing Relay requests.
Use the no form of this command to restore the default setting.
ip dhcp snooping check-giaddr
no ip dhcp snooping check-giaddr

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

This function is disabled by default.

10-3Command Reference

Command

DHCP Snooping Commands(beta)

Global configuration mode

Mode

Usage Guide

After the feature is enabled, services using DHCP Snooping binding entries generated based on
Relay requests, such as IP Source Guard/802.1x authentication, cannot be deployed. Otherwise,
users fail to access the Internet.
After the feature is enabled, the ip dhcp snooping verify mac-address command cannot be used.
Otherwise, DHCP Relay requests will be discarded and as a result, users fail to obtain addresses.

Configuration

The following example enables DHCP Snooping to support the function of processing Relay

Examplesrequests.
Ruijie# configure terminal
Ruijie(config)# ip dhcp snooping check-giaddr

RelatedCommands

Command

Description
Displays the configuration information of theshow ip dhcp snooping

Platform

DHCP Snooping.

N/A

Description

10.5 ip dhcp snooping database write-delay
Use this command to configure the switch to write the dynamic user information of the DHCP
Snooping binding database into the flash periodically.
Use the no form of this command to restore the default setting.
ip dhcp snooping database write-delay time
no ip dhcp snooping database write-delay

Parameter
Description

Parameter

Description
The interval at which the system writes the dynamic user information

timeof the DHCP Snooping database into the flash, in the range from 600
to 86,400 in the unit of seconds

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

10-4

Command Reference

Usage Guide

DHCP Snooping Commands(beta)

This function writes user information into flash in case of loss after restart. In that case, users need toobtain IP addresses again for normal communication.
Too fast writing will reduce flash durability.

Configuration

The following example sets the interval at which the switch writes the user information into the flash to

Examples

3,600 seconds.
Ruijie# configure terminal
Ruijie(config)# ip dhcp snooping database write-delay 3600

RelatedCommands

Command

Description
Displays the configuration information of theshow ip dhcp snooping

Platform

DHCP Snooping.

N/A

Description

10.6 ip dhcp snooping database write-to-flash
Use this command to write the dynamic user information of the DHCP binding database into flash inreal time.
ip dhcp snooping database write-to-flash

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

This command is used to write the dynamic user information of the DHCP binding database into flashin real time.

Configuration

The following example writes the dynamic user information of the DHCP binding database into flash.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp snooping database write-to-flash

10-5Command Reference

RelatedCommands

Platform

DHCP Snooping Commands(beta)

Command

Description

N/A

N/A

N/A

Description

10.7 ip dhcp snooping information option
Use this command to add option82 to the DHCP request message.
Use the no form of this command to restore the default setting.
ip dhcp snooping information option [ standard-format ]no ip dhcp snooping information option [ standard-format ]Parameter
Description

Parameter

Description

standard-format

The option82 uses the standard format.

Defaults

This function is disabled by default,

Command

Global configuration mode

Mode

Usage Guide

This command adds option82 to the DHCP request messages based on which the DHCP server
assigns IP addresses.
By default, this function is in extended mode.
DHCP Relay function adds option82 by default. Therefore, it is unnecessary to enable functionsof DHCP Snooping option82 and DHCP Relay at the same time.

Configuration

The following example adds option82 to the DHCP request message.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp snooping information option

RelatedCommands

Platform

Command

Description

show ip dhcp snooping

Displays the DHCP Snooping configuration.

N/A

Description

10-6

Command Reference

DHCP Snooping Commands(beta)

10.8 ip dhcp snooping information option format remote-id
Use this command to set the option82 sub-option remote-id as the customized character string.
Use the no form of this command to restore the default setting.
ip dhcp snooping information option format remote-id { string ascii-string | hostname }no ip dhcp snooping information option format remote-id { string ascii-string | hostname }Parameter
Description

Parameter

string ascii-string
hostname

Description
The content of the option82 remote-id extension format is customized
character string.
The content of the option82 remote-id extension format hostname

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

This command sets the remote-id in the option82 to be added to the DHCP request message as thecustomized character string. The DHCP server will assign the IP address according to the option82
information.

Configuration

The following example adds the option82 into the DHCP request packets with the content of

Examplesremote-id as hostname.
Ruijie# configure terminal
Ruijie(config)# ip dhcp snooping information option format remote-id hostname

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.9 ip dhcp snooping suppression
Use this command to set the port to be the suppression status.
Use the no form of this command to restore the default setting.
ip dhcp snooping suppression
no ip dhcp snooping suppression

10-7

Command Reference

Parameter
Description

DHCP Snooping Commands(beta)

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

This command denies all DHCP request messages under the port, that is, all the users under the port
are prohibited to request IP addresses through DHCP.
This command is only supported on Layer 2 switch interfaces and aggregate ports (APs).

Configuration

The following example sets GigabitEthernet 0/1 to be in the suppression status.

ExamplesRuijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip dhcp snooping suppression

RelatedCommands

Platform

Command

Description

show ip dhcp snooping

Displays the DHCP Snooping configuration.

N/A

Description

10.10 ip dhcp snooping trust
Use this command to set the trusted ports for DHCP Snooping.
Use the no form of this command to restore the default setting.
ip dhcp snooping trust
no ip dhcp snooping trust

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

All ports are untrusted by default.

Command

Interface configuration mode

10-8

Command Reference

DHCP Snooping Commands(beta)

Mode

Usage Guide

Use this command to set a port as a trusted port. The DHCP response messages received under thetrust port are forwarded normally, but the response messages received under the untrusted port will
be discarded. This command is only supported on Layer 2 switch interfaces and aggregate ports(APs).

Configuration

The following example sets GigabitEthernet 0/1 as a trusted port:

ExamplesRuijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip dhcp snooping trust

RelatedCommands

Platform

Command

Description

show ip dhcp snooping

Displays the DHCP Snooping configuration.

N/A

Description

10.11 ip dhcp snooping verify mac-address
Use this command to check whether the source MAC address of the DHCP request message
matches against the client addr field of the DHCP message.
Use the no form of this command to restore the default setting.
ip dhcp snooping verify mac-address
no ip dhcp snooping verify mac-address

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

Use this command to check the source MAC address of the DHCP request message. If the MAC
address in the link-layer header is different from the CHADDR (Client MAC Address), the check fails,
and the packets will be discarded.

10-9

Command Reference

DHCP Snooping Commands(beta)

Configuration

The following example enables the check of the source MAC address of the DHCP request message.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp snooping verify mac-address

RelatedCommands

Platform

Command

Description

show ip dhcp snooping

Displays the DHCP Snooping configuration.

N/A

Description

10.12 ip dhcp snooping vlan
Use this command to enable DHCP Snooping for the specific VLAN.
Use the no form of this command to restore the default setting.
ip dhcp snooping vlan { vlan-rng | { vlan-min [ vlan-max ] } }no ip dhcp snooping vlan { vlan-rng | { vlan-min [ vlan-max ] } }Parameter
Description

Parameter

Description

vlan-rng

VLAN range of effective DHCP Snooping

vlan-minMinimum VLAN of effective DHCP Snooping

vlan-max

Maximum VLAN of effective DHCP Snooping

Defaults

By default, once the DHCP Snooping is enabled globally, it takes effect for all VLANs.

Command

Global configuration mode

Mode

Usage Guide

Use this command to enable DHCP Snooping for specified VLANs globally.

Configuration

The following example enables the DHCP Snooping function in VLAN 1000.

ExamplesRuijie# configure terminal
Ruijie(config)# ip dhcp snooping vlan 1000

RelatedCommands

Platform

Command

Description

ip dhcp snooping

Enables DHCP Snooping globally.

N/A

10-10

Command Reference

DHCP Snooping Commands(beta)

Description

10.13 ip dhcp snooping vlan max-user
Use this command to set the maximum number of users bound with the VLAN.
Use the no form of this command to restore the default setting.
ip dhcp snooping vlan vlan-word max-user user-number
no ip dhcp snooping vlan vlan-word max-user user-number

Parameter
Description

Parameter

Description

vlan-word

The VLAN range

user-number

The maximum number of users bound with the VLAN

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

Use this command to set the maximum number of users bound with the VLAN. This function
combined with the corresponding topology can prevent illegal DHCP packet attacks.

Configuration

The following example sets the maximum number of users bound with VLAN 1 to 10 and VLAN 20 to

Examples

30 respectively.
Ruijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip dhcp snooping vlan 1-10,20 max-user
30

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.14 ip dhcp snooping vlan information option change-vlan-to vlan
Use this command to enable the option82 sub-option circuit-id and change the VLAN in the circuit-id
into the specified VLAN.

10-11

Command Reference

DHCP Snooping Commands(beta)

Use the no form of this command to restore the default setting.
ip dhcp snooping vlan vlan-id information option change-vlan-to vlan vlan-id
no ip dhcp snooping vlan vlan-id information option change-vlan-to vlan vlan-id

Parameter
Description

Parameter

Description

vlan-id

The ID of the VLAN to be replaced

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

With this command configured, the option82 is added to the DHCP request packets, the circuit-id in
the option82 information is the specified VLAN and the DHCP server will assign the addresses
according to the option82 information.

Configuration

The following adds the option82 to the DHCP request packets and changes the VLAN 4094 in the

Examplesoption82 sub-option circuit-id to VLAN93:
Ruijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip dhcp snooping vlan 4094 information
option change-vlan-to vlan 4093

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.15 ip dhcp snooping vlan information option format-type circuit-id
stringUse this command to configure the option82 sub-option circuit-id as user-defined (the storage format
is ASCII) and to perform the packet forwarding.
Use the no form of this command to restore the default setting.
ip dhcp snooping vlan vlan-id information option format-type circuit-id string ascii-string
no ip dhcp snooping vlan vlan-id information option format-type circuit-id string ascii-string

10-12

Command Reference

Parameter
Description

DHCP Snooping Commands(beta)

Parameter

Description

vlan-id

The VLAN where the DHCP request packets are

ascii-string

The user-defined content to fill to the Circuit ID

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

This command is used to add the option82 to the DHCP request packets. The content of the
sub-option circuit-id is customized with 3 to 63 bytes, and the DHCP server will assign the addresses
according the option82 information.

Configuration

The following example adds the option82 to the DHCP request packets with the content of the

Examplessub-option circuit-id as port-name.
Ruijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip dhcp snooping vlan 4094 information
option format-type circuit-id string port-name

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.16 renew ip dhcp snooping database
Use this command to import the information in current flash to the DHCP Snooping binding databasemanually as needed.
renew ip dhcp snooping database

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

N/A

10-13

Command Reference

Command

DHCP Snooping Commands(beta)

Privileged EXEC mode

Mode

Usage Guide

This command is used to import the flash file information to the DHCP Snooping database in realtime.
Records out of lease time and repeated will be neglected.

Configuration

The following example imports the flash file information to the DHCP Snooping database.

ExamplesRuijie# renew ip dhcp snooping database

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

10.17 show ip dhcp snooping
Use this command to display the DHCP Snooping configuration.
show ip dhcp snooping

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the DHCP Snooping configuration.

ExamplesRuijie# show ip dhcp snooping
Switch DHCP snooping status :ENABLE
Verification of hwaddr field status :DISABLE
DHCP snooping database write-delay time: 0 seconds
DHCP snooping option 82 status: ENABLE

10-14

Command Reference

DHCP Snooping Commands(beta)

DHCP snooping Support Bootp bind status: ENABLE
Interface

TrustedRatelimit(pps)-------------------------------------------------------GigabitEthernet 0/4

YES

Default

RelatedCommands

No

Command

Description

ip dhcp snooping

Enables the DHCP Snooping globally.
Enables the check of source MAC address of

ip dhcp snooping verify mac-address

DHCP Snooping packets.
Sets the interval of writing user information to

ip dhcp snooping write-delay

FLASH periodically.
Adds option82 to the DHCP request message.

ip dhcp snooping information option

Enables the DHCP Snooping bootp bind

ip dhcp snooping bootp-bindfunction.
Sets the port as a trust port.

ip dhcp snooping trust

Platform

unlimited

N/A

Description

10.18 show ip dhcp snooping binding
Use this command to display the information of the DHCP Snooping binding database.
show ip dhcp snooping binding

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to display all the information of the DHCP Snooping binding database.

Configuration

1: The following example displays the information of the DHCP Snooping binding database.

10-15

Command Reference

Examples

DHCP Snooping Commands(beta)

Ruijie# show ip dhcp snooping binding
Total number of bindings: 1
NO.

MACADDRESSIPADDRESSLEASE(SEC)

TYPE

VLAN

INTERFACE----- ------------------ --------------- ------------ ------------- -----------------------10000.0000.0001

1.1.1.1

78128

DHCP-Snooping 1

GigabitEthernet 0/1

Parameter

Description

Total number of bindings

The total number of bindings in the DHCP
Snooping database.

NO.

The record order.

MacAddress

The MAC address of the user.

IpAddress

The IP address of the user.

Lease(sec)

The lease time of the record.

Type

The record type.

VLAN

The VLAN where the user belongs.

Interface

The user’s connection interface. It can be aeither a wired access interface or wirelessaccess WLAN.

RelatedCommands

Command

Description
Adds the static user information to the DHCP

ip dhcp snooping binding

Snooping database.
Clears the dynamic user information from theclear ip dhcp snooping binding

Platform

DHCP Snooping binding database.

N/A

Description

10-16

Command Reference

DHCPv6 Snooping Commands(beta)

11 DHCPv6 Snooping Commands(beta)
11.1 clear ipv6 dhcp snooping binding
Use this command to clear all the user information in the DHCPv6 Snooping binding database.
clear ipv6 dhcp snooping binding [ mac | vlan vlan-id | ipv6-address | interface interface-id ]Parameter
Description

Parameter

DescriptionmacSpecifies the MAC address to be deleted.

vlan-id

Specifies the ID of the VLAN to be cleared.

ipv6-address

Specifies the IPv6 address to be cleared.

interface-id

Specifies the interface to be cleared.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to clear the generated user information in the DHCPv6 Snooping binding
database.

Configuration

The following example clears all the user information in the DHCPv6 Snooping binding database.

ExamplesRuijie# clear ipv6 dhcp snooping binding
Ruijie# show ipv6 dhcp snooping binding
NO. MacAddress

IPv6 Address Lease(sec)

VLAN Interface

FilterType FilterStatus--- ------------------------- ----------------------- --------------------Total number of bindings: 0

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11-1--------------------

Command Reference

DHCPv6 Snooping Commands(beta)

11.2 clear ipv6 dhcp snooping prefix
Use this command to clear all the user information in the DHCPv6 Snooping prefix list.
clear ipv6 dhcp snooping prefix [ mac | vlan vlan-id | ipv6-prefix | interface interface-id

Parameter
Description

Parameter

DescriptionmacSpecifies the MAC address to be deleted.

vlan-id

Specifies the ID of the VLAN to be cleared.

ipv6-address

Specifies the IPv6 address to be cleared.

interface-id

Specifies the interface to be cleared.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to clear the generated user information in the DHCPv6 Snooping prefix list.

Configuration

The following example clears all the user information in the DHCPv6 Snooping binding database

ExamplesRuijie# clear ipv6 dhcp snooping prefix
Ruijie# show ipv6 dhcp snooping prefix
NO. MacAddress

IPv6 Prefix Lease(sec) VLAN Interface

FilterType FilterStatus--- ------------------------- ------------------------------------------- --------------------Total number of prefixes: 0

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.3 clear ipv6 dhcp snooping statistics
Use this command to clear the statistical information of the DHCPv6 packets.
clear ipv6 dhcp snooping statistics

11-2

Command Reference

Parameter
Description

DHCPv6 Snooping Commands(beta)

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to clear the statistical information of the DHCPv6 packets.

Configuration

The following example clears the statistical information of the DHCPv6 packets.

ExamplesRuijie# clear ipv6 dhcp snooping statistics
Ruijie# show ipv6 dhcp snooping statistics
Packets Processed by DHCPv6 Snooping = 0
Packets Dropped Because
Received on untrusted ports= 0

No binding entry= 0

Binding fail= 0

Unknown packet= 0

Unknown output interface

RelatedCommands

Platform= 0

Relay forward= 0

No enough memory= 0

Admin filter-dhcpv6-pkt= 0Command

Description

N/A

N/A

N/A

Description

11.4 ipv6 dhcp snooping
Use this command to enable the DHCPv6 Snooping function globally.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping
no ipv6 dhcp snooping

Parameter

Parameter

Description

11-3

Command Reference

DHCPv6 Snooping Commands(beta)

Description
N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

The show ip dhcpv6 snooping command is used to display whether the DHCPv6 Snooping function
is enabled.

Configuration

The following example enables the DHCPv6 Snooping function globally.

ExamplesRuijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping

RelatedCommands

Platform

Command

Description

show ipv6 dhcp snooping

Displays the DHCPv6 Snooping .

N/A

Description

11.5 ipv6 dhcp snooping binding-delay
Use this command to add the dynamic binding entry to the hardware filtering list after the delay.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping binding-delay seconds
no ipv6 dhcp snooping binding-delay

Parameter
Description

Parameter

Description

seconds

Sets the binding delay time.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

By default, the dynamic binding entries are added to the hardware filtering list in real time. With thiscommand configured, if no IPv6 address conflict is detected within the specified time, the dynamic

11-4

Command Reference

DHCPv6 Snooping Commands(beta)

binding entries are added to the hardware filtering list.

Configuration

The following example sets the delay to 10 seconds.

ExamplesRuijie(config)# ipv6 dhcp snooping binding-delay 10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.6 ipv6 dhcp snooping database write-delay
Use this command to write the dynamic user information of the DHCPv6 Snooping binding database
into the flash periodically.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping database write-delay time
no ipv6 dhcp snooping database write-delay

Parameter
Description

Parameter

Description
The interval ranging from 600 to 86,400 in the unit of seconds, attimewhich the system writes the dynamic user information of the DHCP
Snooping database into the flash.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

This function writes user information into flash and can avoid loss after restart. In that case, users
need to obtain IP addresses again for normal communication.
Too fast writing will reduce flash durability.

Configuration

The following example sets the interval at which the switch writes the user information into the flash to

Examples

3,600 seconds.
Ruijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping database write-delay 3600

11-5Command Reference

RelatedCommands

Platform

DHCPv6 Snooping Commands(beta)

Command

Description

show ipv6 dhcp snooping

Displays the DHCPv6 Snooping configuration.

N/A

Description

11.7 ipv6 dhcp snooping database write-to-flash
Use this command to write the dynamic user information of the DHCPv6 binding database into flashin real time.
ipv6 dhcp snooping database write-to-flash

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

Use this command to write the dynamic user information of the DHCPv6 binding database into flashin real time.

Configuration

The following example writes the dynamic user information of the DHCPv6 binding database into

Examplesflash.
Ruijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping database write-to-flash

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.8 ipv6 dhcp snooping filter-dhcp-pkt
Use this command to filter all received DHCPv6 request packets.

11-6

Command Reference

DHCPv6 Snooping Commands(beta)

Use the no form of this command to restore the default setting.
ipv6 dhcp snooping filter-dhcp-pkt
no ipv6 dhcp snooping filter-dhcp-pkt

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

Use this command to filter all received DHCPv6 request packets, that is, to avoid all the DHCPv6
users on this interface to apply for the addresses.
This command is valid only on 2-layer wired switch ports, aggregate ports and sub interfaces as wellas in air interfaces.

Configuration

The following example filters all DHCPv6 request packets on interface GigabitEthernet 0/1 and WLAN

Examples1.
Ruijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 dhcp snooping filter-dhcp-pkt

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.9 ipv6 dhcp snooping information option
Use this command to add option18/37 to the DHCPv6 request packets.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping information option [ standard-format ]no ipv6 dhcp snooping information option [ standard-format ]Parameter
Description

Parameter

Description

11-7

Command Reference

standard-format

DHCPv6 Snooping Commands(beta)

The Option18/37 uses the standard format.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

With this command configured, the option18/37 will be added to the DHCPv6 request packets and the
DHCPv6 server will assign the addresses according to the option18/37 information. Use thiscommand without parameter standard-format to enable the standard format.
DHCPv6 Relay function adds option18/37 by default. Therefore, it is unnecessary to enable
functions of DHCP Snooping option18/37 and DHCPv6 Relay at the same time.

Configuration

The following example adds the option18/37 into the DHCPv6 packets.

ExamplesRuijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping information option
Ruijie(config)# end
Ruijie# show ipv6 dhcp snooping
Switch DHCPv6 snooping status :ENABLE
DHCPv6 snooping vlan: 1-4094
DHCPv6 snooping database write-delay time: 0 seconds
DHCPv6 snooping option 18/37 status: ENABLE
DHCPv6 snooping link detection :DISABLE
Interface

Trusted---------------------- ------GigabitEthernet0/1

RelatedCommands

Filter DHCP---------yes

DISABLE

Command

Description
Displays the configuration information of theshow ipv6 dhcp snooping

Platform

DHCPv6 Snooping.

N/A

Description

11.10 ipv6 dhcp snooping information option format remote-id
Use this command to add option37 remote-id customized character string into the DHCPv6 request
packets.
Use the no form of this command to restore the default setting.

11-8

Command Reference

DHCPv6 Snooping Commands(beta)

ipv6 dhcp snooping information option format remote-id [ string ascii-string | hostname ]no ipv6 dhcp snooping information option format remote-id [ string ascii-string | hostname ]Parameter
Description

Parameter

string ascii-string
hostname

Description
The content of Option37 remote-id extension format is customized
character string.
The content of Option37 remote-id extension format is hostname.

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

With this command configured, the option37 remote-id will be added to the DHCPv6 request packets
with the content as the customized and the DHCPv6 server will assign the addresses according to theoption37 information.

Configuration

The following example adds the option37 remote-id to the DHCPv6 request packets with the content

Examplesbeing hostname.
Ruijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping information option format remote-id
hostname

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.11 ipv6 dhcp snooping link-detection
Use this command to clear the dynamic binding entry on an interface when the interface links down.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping link-detection
no ipv6 dhcp snooping link-detection

Parameter
Description

Parameter

Description

11-9

Command Reference

N/A

DHCPv6 Snooping Commands(beta)

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

By default, the dynamic binding entries are not cleared on a wired interface when the interface links
down. With this function enabled, the dynamic binding entries are auto-cleared on an interface when
the interface is in the LINK DOWN status.

Configuration

The following example clears the dynamic binding entry on a wired interface when the interface is in

Examplesthe LINK DOWN status.
Ruijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping link-detection

RelatedCommands

Command

Description
Displays the configuration information of theshow ipv6 dhcp snooping

DHCPv6 Snooping.

Platform
Description

N/A

11.12 ipv6 dhcp snooping trust
Use this command to set the specified DHCPv6 Snooping ports as the trusted ports.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping trust
no ipv6 dhcp snooping trust

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

All ports are untrusted ports by default.

Command

Interface configuration mode

Mode

11-10

Command Reference

Usage Guide

DHCPv6 Snooping Commands(beta)

1. Use this command to set a port as a trusted port. The DHCPv6 Server response messages
received under the trust port are forwarded normally, but the response messages received under theuntrusted port will be discarded.
2. This command is valid only on Layer 2 wired switch ports and aggregate ports.

Configuration

The following example sets GigabitEthernet 0/1 as a trust port:

ExamplesRuijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 dhcp snooping trust

RelatedCommands

Platform

Command

Description

show ipv6 dhcp snooping

Displays the DHCPv6 Snooping configuration.

N/A

Description

11.13 ipv6 dhcp snooping vlan
Use this command to enable DHCPv6 Snooping for the specific VLAN.
Use the no form of this command to disable this function.
ipv6 dhcp snooping vlan { vlan-rng | { vlan-min [ vlan-max ] } }no ipv6 dhcp snooping vlan { vlan-rn | { vlan-min [ vlan-max ] } }Parameter
Description

Parameter

Description

vlan-rng

Sets the valid VLAN range.

vlan-minMinimum VLAN ID

vlan-max

Maximum VLAN ID

Defaults

By default, once the DHCPv6 Snooping is enabled globally, it takes effect for all VLANs.

Command

Global configuration mode

Mode

Usage Guide

With the global DHCPv6 snooping enabled, this function is enabled in all VLANs by default.

Configuration

The following example enables the DHCPv6 Snooping function in VLAN 1000.

ExamplesRuijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping vlan 1000

11-11Command Reference

DHCPv6 Snooping Commands(beta)

The following example enables the DHCPv6 Snooping function in VLAN 1 to VLAN 10.
Ruijie# configure terminal
Ruijie(config)# ipv6 dhcp snooping vlan 1-10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.14 ipv6 dhcp snooping vlan information option change-vlan-to vlan
Use this command to enable the function of adding the option18 interface-is into the DHCP request
packets and change the VLAN to the specified VLAN for the forwarding.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping vlan vlan-id information option change-vlan-to vlan vlan-id
no ipv6 dhcp snooping vlan vlan-id information option change-vlan-to vlan vlan-id

Parameter
Description

Parameter

Description

vlan-id

Specifies the ID of the VLAN to be replaced.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

With this command enabled, the option18 interface-id will be added into the DHCPv6 request packets
and the VLAN will be changed to the specified one and the DHCP server will assign the addresses
according to the optionq8 information.

Configuration

The following example adds the option18 interface-id into the DHCPv6 request packets and changes

Examplesthe VLAN4094 in the option to VLAN 4093.
Ruijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 dhcp snooping vlan 4094
information option change-vlan-to vlan 4093

11-12

Command Reference

RelatedCommands

Platform

DHCPv6 Snooping Commands(beta)

Command

Description

N/A

N/A

N/A

Description

11.15 ipv6 dhcp snooping vlan information option format-type interface-id
stringUse this command to enable the function of adding the option18 into the DHCP request packets andfilling the option18 interface-id with the content being the user-defined (the storage format is ASCII)
and performing the packet forwarding.
Use the no form of this command to restore the default setting.
ipv6 dhcp snooping vlan vlan-id information option format-type interface-id string ascii-string
no ipv6 dhcp snooping vlan vlan-id information option format-type interface-id string
ascii-string

Parameter
Description

Parameter

Description

vlan-id

The VLAN where the DHCPv6 request packets are

ascii-string

User-defined content for filling the interface-id

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

With this command configured, the option18 interface-id will be added into the DHCPv6 request
packets with the content being user-defined and the DHCPv6 server will assign the addresses
according to the option18 information.

Configuration

The following example adds the option18 interface-id to the DHCPv6 request packets with the content

Examplesbeing port-name.
Ruijie# configure terminal
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 dhcp snooping vlan 4094
information option format-type interface-id string port-name

11-13

Command Reference

RelatedCommands

Platform

DHCPv6 Snooping Commands(beta)

Command

Description

N/A

N/A

N/A

Description

11.16 renew ipv6 dhcp snooping database
Use this command to import the information in current flash to the DHCPv6 Snooping binding
database manually as needed.
renew ipv6 dhcp snooping database

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to import the flash file information to the DHCPv6 Snooping database in realtime.
Records out of lease time and repeated will be neglected.

Configuration

The following example imports the flash file information to the DHCPv6 Snooping database .

ExamplesRuijie# renew ipv6 dhcp snooping database

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.17 show ipv6 dhcp snooping
Use this command to display the setting of the DHCPv6 Snooping.

11-14

Command Reference

DHCPv6 Snooping Commands(beta)

show ipv6 dhcp snooping

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the setting of the DHCPv6 Snooping.

ExamplesRuijie# show ipv6 dhcp snooping
Switch DHCPv6 snooping status :ENABLE
DHCPv6 snooping vlan: 1-4094
DHCPv6 snooping database write-delay time: 0 seconds
DHCPv6 snooping option 18/37 status: DISABLE
DHCPv6 snooping link detection :DISABLE
Interface

TrustedFilter DHCP---------------------- ------GigabitEthernet0/1

RelatedCommands

Platform---------yes

DISABLE

Command

Description

N/A

N/A

N/A

Description

11.18 show ipv6 dhcp snooping binding
Use this command to display the information of the DHCPv6 Snooping binding database.
show ipv6 dhcp snooping binding [ mac ] [ vlan vlan-id ] [ ipv6-address ] [ interface interface-id ]Parameter
Description

Parameter

Description

ipv6-address

Displays the IPv6 address binding entry.

mac-address

Displays the MAC address binding entry.

11-15

Command Reference

DHCPv6 Snooping Commands(beta)vlan vlan_id

Displays the VLAN binding entry.

interface interface_name

Displays the interface binding entry.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the information of the DHCP Snooping binding database.

ExamplesRuijie# show ipv6 dhcp snooping binding
Total number of bindings: 1
NO.

MacAddress

IPv6 Address

Lease(sec)

VLAN Interface----- ----------------- ------------------------------------------------------ ----- -------------------1

00d0.f801.0101

2001::10

42368

GigabitEthernet 0/1

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11.19 show ipv6 dhcp snooping prefix
Use this command to display all user information in the DHCPv6 Snooping prefix list.
show ipv6 dhcp snooping prefix [ mac | vlan vlan-id | ipv6-prefix | interface interface-id ]Parameter
Description

Defaults

Parameter

Description

ipv6-prefix

Displays the IPv6 address prefix entry.

mac-address

Displays the MAC address prefix entry.

vlan vlan_id

Displays the VLAN prefix entry.

interface interface_name

Displays the interface prefix entry.

N/A

11-16

2

Command Reference

Command

DHCPv6 Snooping Commands(beta)

Privileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays all user information in the DHCPv6 Snooping prefix list.

ExamplesRuijie# show ipv6 dhcp snooping prefix
Total number of prefix: 1
NO.

MacAddress

IPv6 Prefix

Lease(sec)

VLAN Interface----- ----------------- ------------------------------------------------------ ----- --------------------

RelatedCommands

Platform

100d0.f801.0101

2001:2002::/64

2

GigabitEthernet 0/1

42368

Command

Description

N/A

N/A

N/A

Description

11.20 show ipv6 dhcp snooping statistics
Use this command to display the statistical information of the DHCPv6 packets.
show ipv6 dhcp snooping statistics

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

11-17

Command Reference

DHCPv6 Snooping Commands(beta)

Configuration

The following example displays the statistical information of the DHCPv6 packets.

ExamplesRuijie# show ipv6 dhcp snooping statistics
Packets Processed by DHCPv6 Snooping = 0
Packets Dropped Because
Received on untrusted ports= 0

Relay forward= 0

No binding entry= 0

Binding fail= 0

Unknown packet= 0

Unknown output interface= 0

No enough memory= 0

Admin filter-dhcpv6-pkt

= 0

Field

Description
The discarded server response packets on the

Received on untrusted ports

untrust port.
The packets that have been relayed once are

Relay forward

discarded.
The binding entries of the release/decline

No binding entry

packets are in-existent or error and the packets
are discarded.
The entry binding fails and the packets are

Binding faildiscarded due to a lack of the hardware
resources.

Unknown packet

The unknown DHCP packets.
The packets on the unknown output interface.

Unknown output interface

The MAC address for the interface is not foundor the trust port is not configured.

No enough memory

There is no enough memory.
The filtered DHCPv6 packets configured by the

Admin filter-dhcpv6-pkt

administrator. Use the ipv6 dhcp snooping
filter-dhcp-pkt command to filter the packets.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11-18

Command Reference

DHCPv6 Snooping Commands(beta)

11.21 show ipv6 dhcp snooping vlan
Use this command to display the VLAN with DHCPv6 Snooping function disabled.
show ipv6 dhcp snooping vlan

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to display the VLAN with DHCPv6 Snooping function disabled.

Configuration

The following example displays the VLAN with DHCPv6 Snooping function disabled.

ExamplesRuijie# show ipv6 dhcp snooping vlan
VLAN Name

Closed---- ----------- ------2

VLAN 2

YES

Field

Description

VLAN

VLAN IDNAME

VLAN name

Close

Indicates whether DHCPv6 Snooping is
disabled.

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

11-19

Command Reference

ARP-Check Commands(beta)

12 ARP-Check Commands(beta)
12.1 arp-check
Use this command to enable the ARP check function on the Layer 2 interface.
Use the no form of this command to restore the default setting.
arp-checkno arp-check

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Interface configuration mode

mode

Usage Guide

The ARP check function generates the ARP filtering information according to legal user information,
implementing the illegal ARP packet filtering on the network.

Configuration

This following example enables the APR check function on interface GigabitEthernet 0/1.

ExamplesRuijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# arp-check
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Platform

Command

Description

show interfaces arp-check list

Displays the ARP check entries.

N/A

Description

12.2 show interfaces arp-check list
Use this command to display the ARP check entries on the Layer 2 interface.
show interfaces [ interface-type interface-number ] arp-check list

12-1

Command Reference

Parameter
Description

ARP-Check Commands(beta)

Parameter

Description

interface-type

Wired interface typeinterface-number

Wired interface number

Defaults

N/A

CommandPrivileged EXEC mode

mode

Usage Guide

Use this command to display the ARP check entries.

Configuration

The following example displays the ARP check entries.

ExamplesRuijie# show interfaces arp-check list
INTERFACESENDER MAC

SENDER IP

POLICY SOURCE------------------------ ---------------- ----------------------------------GigabitEthernet 0/1

00D0.F800.0003

192.168.1.3

address-bind

GigabitEthernet 0/1

00D0.F800.0001

192.168.1.1

port-security

GigabitEthernet 0/4

RelatedCommands

Platform

192.168.1.3

port-security

GigabitEthernet 0/5

00D0.F800.0003

192.168.1.3

address-bind

GigabitEthernet 0/7

00D0.F800.0006

192.168.1.6

AAA ip-auth-mode

GigabitEthernet 0/8

00D0.F800.0007

192.168.1.7

GSN

Field

Description

INTERFACE

Interface name

SENDER MAC

Source MAC address

SENDER IP

Source IP address

POLICY SOURCE

Source of the entry

Command

Description

N/A

N/A

N/A

Description

12-2

Command Reference

DAI Commands(beta)

13 DAI Commands(beta)
13.1 ip arp inspection trust
Use this command to configure the L2 port to a trusted port.
Use the no form of this command to restore the L2 port to an untrusted port.
ip arp inspection trust
no ip arp inspection trust

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The L2 port is untrusted.

Command

Interface configuration mode

Mode

Usage Guide

If it is necessary to make the ARP message received by some interface pass the DAI inspection
unconditionally, you can set the interface to a trusted port, indicating that you do not need to check
whether the ARP message received by this interface is legal.

Configuration

The following example sets the GigabitEthernet 0/19 interface as the trusted port.

ExamplesRuijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/19
Ruijie(config-if-GigabitEthernet 0/19)# ip arp inspection trust
Ruijie(config-if-GigabitEthernet 0/19)# end

RelatedCommands

Command

Description
Displays related DAI information on theinterface, including the trust state and rate limit

show ip arp inspection interfaceof the interface.

Platform

N/A

Description

13-1

Command Reference

DAI Commands(beta)

13.2 ip arp inspection vlan
Use this command to configure the DAI function on the VLAN.
Use the no form of this command to disable this function.
ip arp inspection vlan { vlan-id | word }no ip arp inspection vlan { vlan-id | word }Parameter
Description

Parameter

Description

vlan-id

VLAN ID, ranging from 1 to 4094

word

String of the VLAN range, such as 1,3-5,7,9-11

Defaults

The DAI function on all VLANs is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

To make this command take effect, you need to enable the ARP Check function first,
Not all ports of the VLAN support the ARP packet detection function. For example, the DHCP
Snooping Trust port does not support any security detection, including this function.

Configuration

The following example detects the received ARP packets on the VLAN1 interfaces:

ExamplesRuijie# configure terminal
Ruijie(config)# ip arp inspection vlan 1
Ruijie(config)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

13.3 show ip arp inspection interface
Use this command to verify whether the interface is a DAI trust interface.
show ip arp inspection interface

Parameter

Parameter

Description

13-2

Command Reference

DAI Commands(beta)

Description
N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

Use this command to verify whether the interface is a DAI trust interface.

Configuration

The following example verifies the DAI trust state of all :ExamplesRuijie# show ip arp inspection interface
Interface

Trust State--------------------------------

GigabitEthernet 0/1

Untrusted

Default

Untrusted

Parameter Description:

RelatedCommands

Platform

Parameter

Description

Interface

Interface name.

Trust State

DAI trust state.

Command

Description

N/A

N/A

N/A

Description

13.4 show ip arp inspection vlan
Use this command to verify whether the DAI function on the VLAN is enabled.
show ip arp inspection vlan [ vlan-id | word ]Parameter
Description

Defaults

Parameter

Description

vlan-id

VLAN ID, ranging from 1 to 4094

word

String of the VLAN range, such as 1,3-5,7,9-11

N/A

13-3

Command Reference

Command

DAI Commands(beta)

Privileged EXEC mode

Mode

Usage Guide

Use this command to verify whether the DAI function on the VLAN is enabled.

Configuration

The following example verifies whether the DAI function on the VLAN is enabled:

ExamplesRuijie# show ip arp inspection vlan
Vlan

Configuration-----------------

1

ActiveParameter Description:

RelatedCommands

Platform

Parameter

Description

Vlan

VLAN number.

Configuration

DAI status (active / inactive)

Command

Description

N/A

N/A

N/A

Description

13-4

Command Reference

IP Source Guard Commands(beta)

14 IP Source Guard Commands(beta)
14.1 ip source binding
Use this command to add static user information to IP source address binding database.
Use the no form of this command to delete static user information from IP source address binding
database.
ip source binding mac-address vlan vlan-id ip-address { interface interface-id | ip-mac | ip-only }no ip source binding mac-address vlan vlan-id ip-address { interface interface-id | ip-mac |ip-only }Parameter
Description

Parameter

Description

mac-address

Adds user MAC address statically.

vlan-id

Adds user VLAN ID statically.

ip-address

Adds user IP address statically.

interface-id

Adds user interface ID statically.

ip-macThe global binding type is IP+MAC

ip-only

The global binding type is IP only.

Defaults

No static address is added by default.

Command

Global configuration mode

Mode

Usage Guide

This command allows specific clients to go through IP source guard detection instead of DHCP.
This command is supported on the wired L2 switching port, AP port and sub interface.
This command enables global binding for IP source guard so that specific clients will get detected on
all interfaces.
A static IPv6 source binding is valid either on wired and WLAN interfaces or in global
configuration mode.
A new binding will overwrite the old one sharing the same configuration.

Configuration

The following example adds the interface Id of static users.

ExamplesRuijie# configure terminal
Ruijie(config)# ip source binding 0000.0000.0001 vlan 1 1.1.1.1 interface
gigabitethernet 0/1
Ruijie(config)# end

14-1

Command Reference

IP Source Guard Commands(beta)

The following example adds static user information based on IP-MAC binding.
Ruijie# configure terminal
Ruijie(config)# ip source binding 0000.0000.0001 vlan 1 1.1.1.1 ip-mac
Ruijie(config)# end

The following example adds static user information based on IP binding.
Ruijie# configure terminal
Ruijie(config)# ip source binding 0000.0000.0001 vlan 1 1.1.1.1 ip-only
Ruijie(config)# end

RelatedCommands

Command

Description
Displays the binding information of IP sourceshow ip source binding

Platform

address and database.

N/A

Description

14.2 ip verify source
Use this command to enable IP Source Guard function on the interface.
Use the no form of this command to restore the default setting.
ip verify source [ port-security ]no ip verify source

Parameter
Description

Parameter

Description

port-security

Configures IP Source Guard to do IP+MAC-based detection.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage Guide

This command enables IP Source Guard function on the interface to do IP-based or IP+MAC-based
detection.
This command is supported on the wired L2 switching port, AP port and sub interface.
IP Source Guard takes effect only on DHCP Snooping untrusted port. In other words, IP Source
Guard does not take effect when configuring it on Trust port or the port which is not controlled by

14-2

Command Reference

IP Source Guard Commands(beta)

DHCP Snooping.

Configuration
ExamplesThe following example enables IP-based IP Source Guard function.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip verify source
Ruijie(config-if)# end

The following example enables IP+MAC-based IP Source Guard function.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/2
Ruijie(config-if-GigabitEthernet 0/2)# ip verify source port-security
Ruijie(config-if)# end

RelatedCommands

Platform

Command

Description

show ip verify source

Displays user filtering entry of IP Source Guard.

N/A

Description

14.3 ip verify source exclude-vlan
Use this command to exclude a VLAN from the IP source guard configuration on the port.
Use the no form of this command to restore the function.
ip verify source exclude-vlan vlan-id
no ip verify source exclude-vlan vlan-id

Parameter
Description

Parameter

Description

vlan-id

The ID of VLAN excluded from the IP source guard configuration.

Defaults

This function is disabled by default.

Command

Interface configuration mode

Mode

Usage GuideThis command is used to exclude a VLAN from the IP source guard configuration. IP packets inthis VLAN are forwarded without being checked and filtered.

Once the IP source guard function is disabled, the excluded VLAN is cleared automatically.

14-3

Command Reference

IP Source Guard Commands(beta)

This command is supported on the wired L2 switching port, AP port and sub interface.
Only when the IP source guard configuration is enabled on the port can a VLAN be excluded.

Configuration

The following example configuration configures the IP source guard configuration for the port andExamplesexcludes a VLAN.
Ruijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip verify source
Ruijie(config-if-GigabitEthernet 0/1)# ip verify source exclude-vlan 1
Ruijie(config-if)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

14.4 show ip source binding
Use this command to display the binding information of IP source addresses and database.
show ip source binding [ ip-address ] [ mac-address ] [ vlan vlan-id ] [ interface interface-id ][ dhcp-snooping | static ]Parameter
Description

Parameter

Description

ip-address

Displays user binding information of corresponding IP.

mac-address

Displays user binding information of corresponding MAC.

vlan-id

Displays user binding information of corresponding VLAN.

interface-id

Displays user binding information of corresponding interface.

dhcp-snooping

Displays binding information of dynamic user.

static

Displays binding information of static user.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

14-4

Command Reference

Configuration
ExamplesIP Source Guard Commands(beta)

The following example displays the binding information of IP source guard addresses and database.
Ruijie# show ip source binding static
Total number of bindings: 5
NO.

MACADDRESSIPADDRESSLEASE(SEC)

TYPE

VLAN

INTERFACE----- ------------------ --------------- ------------ ------------- -----------------------1

0001.0002.0001

1.2.3.2

Infinite

Static1

Global20001.0002.0002

1.2.3.3

Infinite

Static1

GigabitEthernet

30001.0002.0003

1.2.3.4

Infinite

Static1

Global40001.0002.0004

1.2.3.5

Infinite

Static1

Global0/5

RelatedCommands

Platform

Command

Description

ip source binding

Sets the binding static user.

N/A

Description

14.5 show ip verify source
Use this command to display user filtering entry of IP Source Guard.
show ip verify source [ interface interface-id ]Parameter
Description

Parameter

Description

interface-id

Displays user filtering entry of corresponding interface.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

If IP Source Guard is not enabled on the corresponding interface, the printing information will beshown on the terminal as: “IP source guard is not configured on the interface GigabitEthernet 0/10”
Now, IP Source Guard supports the following filtering modes:
inactive-restrict-off: the IP Source Guard is disabled on bound interfaces.
inactive--not-apply: the IP Source Guard cannot adds bound entries into filtering entries for systemerrors.
active: the IP Source Guard is active.

14-5

Command Reference

IP Source Guard Commands(beta)

Configuration

The following example displays user filtering entry of IP Source Guard.

ExamplesRuijie# show ip verify source
Total number of bindings: 7
NO.

INTERFACE

MACADDRESSFILTERTYPEFILTERSTATUS

IPADDRESSVLAN TYPE----- -------------------- ----------- ----------------------------------- --------------- -------- ------------1

GlobalIP+MAC

Inactive-not-apply

192.168.0.127

0001.0002.0003 1 Static
2

GigabitEthernet 0/5 IP-ONLY

Active1.2.3.40001.0002.0004 1 DHCP-Snooping
3

Global

IP-ONLY

Active1.2.3.7

Active1.2.3.60001.0002.0007 1 Static
4

GlobalIP+MAC

0001.0002.0006 1 Static
5

GigabitEthernet 0/1 UNSETInactive-restrict-off 1.2.3.9

0001.0002.0009 1 DHCP-Snooping
6

RelatedCommands

Platform

GigabitEthernet 0/5 IP-ONLY

ActiveDeny-All

Command

Description

ip verify source

Sets IP Source Guard on the interface.

N/A

Description

14-6

Command Reference

DoS Protection Commands

15 DoS Protection Commands
15.1 ip deny invalid-l4port
Use this command to enable the anti-attack of the self-consumption.
Use the no form of this command to restore the default setting.
ip deny invalid-l4port
no ip deny invalid-l4port

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example enables the anti-attack of the self-consumption.

ExamplesRuijie(config)# ip deny invalid-l4port

The following example disables the anti-attack of the self-consumption.
Ruijie(config)# no ip deny invalid-l4port

RelatedCommands

Command

Description
Displays the state of anti-attack of theshow ip deny invalid-l4port

Platform

self-consumption.

N/A

Description

15.2 ip deny invalid-tcp
Use this command to enable the anti-attack of the invalid TCP packets.
Use the no form of this command to restore the default setting.
ip deny invalid-tcp

15-1

Command Reference

DoS Protection Commands

no ip deny invalid-tcp

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example enables the anti-attack of the invalid TCP packets:

ExamplesRuijie(config)# ip deny invalid-tcp

The following example disables the anti-attack of the invalid TCP packets:
Ruijie(config)# no ip deny invalid-tcp

RelatedCommands

Command

Description
Displays the state of anti-attack of the invalid

show ip deny invalid-tcp

Platform

TCP packets.

N/A

Description

15.3 ip deny land
Use this command to enable the anti-land-attack.
Use the no form of this command to restore the default setting.
ip deny land
no ip deny landParameter
Description

Defaults

Parameter

Description

N/A

N/A

This function is disabled by default.

15-2

Command Reference

Command

DoS Protection Commands

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example enables the anti-land-attack:

ExamplesRuijie(config)# ip deny land
The following example disables the anti-land-attack:Ruijie(config)# no ip deny land

RelatedCommands

Platform

Command

Description

show ip deny land

Displays the anti-land-attack state.

N/A

Description

15.4 show ip deny
Use this command to display the state of the anti-DOS-attack.
show ip denyParameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the state of the anti-DOS-attack.

ExamplesRuijie# show ip denyProtect against Land attack

RelatedOn

Protect against invalid L4port attack

Off

Protect against invalid TCP attack

Off

Command

Description

15-3

Command Reference

DoS Protection Commands

Commands
N/A

Platform

N/A

N/A

Description

15.5 show ip deny invalid-l4port
Use this command to display the state of the anti-consumption-attack.
show ip deny invalid-l4port

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the state of the anti-consumption-attack.

ExamplesRuijie# show ip deny invalid-l4port
DoS Protection Mode

State------------------------------------

protect against invalid l4port attack Off

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

15.6 show ip deny invalid-tcp
Use this command to display the state of the anti-attack of the invalid TCP packets.
show ip deny invalid-tcp

15-4

Command Reference

Parameter
Description

DoS Protection Commands

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the state of the anti-attack of the invalid TCP packets.

ExamplesRuijie# show ip deny invalid-tcp
DoS Protection Mode

State------------------------------------------

protect against invalid tcp attack

RelatedCommands

On

Command

Description

ip deny invalid-tcp

Enables the anti-attack of the invalid TCP
packets.

Platform

N/A

Description

15.7 show ip deny land
Use this command to display the anti-land-attack state.
show ip deny landParameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

15-5

Command Reference

DoS Protection Commands

Configuration

The following example displays the anti-land-attack state.

ExamplesRuijie# show ip deny land

RelatedCommands

Platform

DoS Protection Mode

State-----------------------------------

protect against land attack

On

Command

Description

no ip deny land

Enables the anti-land-attack function.

N/A

Description

15-6

Command Reference

PPPoE Intermediate Agent Commands(beta)

16 PPPoE Intermediate Agent Commands(beta)
16.1 pppoe intermediate-agent
Use this command to enable PPPoE IA globally.
The the no form of this command to restore the default settings.
pppoe intermediate-agent
no pppoe intermediate-agent

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

By default, this function is disabled.

Command

Global configuration mode and Interface configuration mode

Mode

Usage Guide

If you want to run pppoe intermediate-agent on the ports of a switch, you must enable it globally first,
otherwise it is invalid to enable this function on ports.

Configuration

The following example enables PPPoE IA.

ExamplesRuijie# configure terminal
Ruijie(config)# pppoe intermediate-agent
Ruijie(config)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16.2 pppoe intermediate-agent trust
Use this command to configure the trusted ports for PPPoE IA.
Use the no form of this command to restore the default settings.
pppoe intermediate-agent trust

16-1

Command Reference

PPPoE Intermediate Agent Commands(beta)

no pppoe intermediate-agent trust

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

By default, all ports are untrusted ports.

Command

Interface configuration mode

Mode

Usage Guide

At least one port should be configured as a trusted port that can be connected to a server to copy andforward the PPPoE packets of clients.

Configuration

The following example configures a GigabitEthernet 0/1 as a trusted port.

ExamplesRuijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# pppoe intermediate-agent trust
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16.3 pppoe intermediate-agent type tr-101 circuit-id access-node-id
Use this command to add the value of the access node id of circuit ID in vendor tag.
Use the no form of this command to restore default settings.
pppoe intermediate-agent type tr-101 circuit-id access-node-id string
no pppoe intermediate-agent type tr-101 circuit-id access-node-id

Parameter
Description

Defaults

Parameter

Description

string

The value of the access node id of circuit ID in vendor tag.

By default, it function is disabled.

16-2

Command Reference

Command

PPPoE Intermediate Agent Commands(beta)

Global configuration mode

Mode

Usage Guide

Add the value of the access node id of circuit ID in vendor tag.

Configuration

The following example adds the access node id to PPPoE packets.

ExamplesRuijie# configure terminal
Ruijie(config)# pppoe intermediate-agent typ tr-101 circuit-id access-node-id
abcd
Ruijie(config)# end

RelatedCommands

Platform

Command

Description

N/A

Description

16.4 pppoe intermediate-agent type tr-101 circuit-id identifier-string
Use this command to add the circuit-id of a vendor tag.
Use the no form of this command to restore the default settings.
pppoe intermediate-agent type tr-101 circuit-id identifier-string string option { pv | sp | spv | sv }delimiter string
no pppoe intermediate-agent type tr-101 circuit-id identifier-string option delimiter

Parameter
Description

Parameter

Description

stringCustom identifierdelimiter

Separators between fields

Defaults

By default, this function is disabled.

Command

Global configuration mode

Mode

Usage Guide

Add the circuit-id of the vendor tag.

Configuration

The following example adds the circuit-id to PPPoE packets.

ExamplesRuijie# configure terminal
Ruijie(config)# pppoe intermediate-agent type tr-101 circuit-id

16-3

Command Reference

PPPoE Intermediate Agent Commands(beta)

identifier-string aaa option pv delimiter b

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16.5 pppoe intermediate-agent type self-defined circuit-id
Use this command to configure a customized circuit-id.
Use the no form of this command to restore default settings.
pppoe intermediate-agent type self-defined circuit-id { id { remote-mac | switch-id { hostname |mac } } | port | string word | vlan }no pppoe intermediate-agent type self-defined circuit-id

Parameter
Description

Parameter

Description

vlan

The VLAN where PPPoE request packets exist.

port

The port used to receive PPPoE packets.

id

The MAC address and name of an access device.

Defaults

By default, this function is disabled.

Command

Global configuration mode

Mode

Usage Guide

Configure custom circuit-id.

Configuration

The following example adds the circuit-id to the PPPoE request packets.

ExamplesRuijie# configure terminal
Ruijie(config)# pppoe intermediate-agent type self-defined circuit-id string
abcd

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

16-4

Command Reference

PPPoE Intermediate Agent Commands(beta)

Description

16.6 pppoe intermediate-agent type self-defined remoteid
Use this command to configure customized remote-id.
Use the no form of this command to restore the default settings.
pppoe intermediate-agent type self-defined remoteid { hostname | mac | string word |vlan-mac }no pppoe intermediate-agent type self-defined remote-id

Parameter
Description

Parameter

Description

hostname

Adds the hostname as the circuit-id to PPPoE request packets.

mac

Adds the mac as the circuit-id to PPPoE request packets

vlan-mac

Adds the vlan and mac as the circuit-id to PPPoE request packets

Defaults

By default, this function is disabled.

Command

Global configuration mode

Mode

Usage Guide

Configure a customized remote-id.

Configuration

The following example adds the customized circuit-id to PPPoE request packets.

ExamplesRuijie# configure terminal
Ruijie(config)# pppoe intermediate-agent type self-defined remoteid stringaaaa
Ruijie(config)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16.7 pppoe intermediate-agent delimiter
Use this command to configure the separators between the fields of a circuit-id and a remote-id.
Use the no form of this command to restore the default settings.

16-5

Command Reference

PPPoE Intermediate Agent Commands(beta)

pppoe intermediate-agent delimiter word
no pppoe intermediate-agent delimiter

Parameter
Description

Parameter

Description

word

The separators between the fields of a circuit-id and a remote-id.

Defaults

By default, this function is disabled.

Command

Global configuration mode

Mode

Usage Guide

Configure the separators between the fields of a circuit-id and a remote-id.

Configuration

Configure the separators between the fields of a circuit-id and a remote-id as ‘#’.

ExamplesRuijie# configure terminal
Ruijie(config)# pppoe intermediate-agent delimiter #Ruijie(config)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16.8 pppoe intermediate-agent vendor-tag strip
Use this command to configure vendor-tag strip function.
Use the no form of this command to restore the default settings.
pppoe intermediate-agent vendor-tag strip
no pppoe intermediate-agent vendor-tag strip

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

By default, this function is disabled.

Command

Interface configuration mode

16-6

Command Reference

PPPoE Intermediate Agent Commands(beta)

Mode

Usage Guide

Strip function must be configured on trusted ports. If the function is configured on untrusted ports, itwould fail to take effect.

Configuration

The following example enables vendor-tag strip function on port 1.

ExamplesRuijie# configure terminal
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# pppoe intermediate-agent vendor-tag
strip
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16.9 pppoe intermediate-agent circuit-id
Use this command to configure the custom circuit-id of a port.
Use the no form of this command to restore the default settings.
pppoe intermediate-agent circuit-id string
no pppoe intermediate-agent circuit-id

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

By default, this function is disabled.

Command

Interface configuration mode

Mode

Usage Guide

Configure the circuit-id of a port.

Configuration

The following example configures the custom circuit-id on a port.

ExamplesRuijie(config)#interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# pppoe intermediate-agent circuit-id

16-7

Command Reference

PPPoE Intermediate Agent Commands(beta)

aaa
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16.10 pppoe intermediate-agent remote-id
Use this command to configure the custom remote-id of a port.
Use the no form of this command to restore the default settings.
pppoe intermediate-agent remote-id string
no pppoe intermediate-agent remote-id

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

By default, this function is disabled.

Command

Interface configuration mode

Mode

Usage Guide

Configure the remote-id of a port.

Configuration

The following example configures the customized remote-id of a port.

ExamplesRuijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# pppoe intermediate-agent remote-id bbb
Ruijie(config-if-GigabitEthernet 0/1)# end

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

16-8

System Commands
1. Basic Configuration Management Commands
2. Line Commands
3. File System Commands
4. SYS Commands
5. Time Range Commands
6. HTTP Service Commands
7. Syslog Commands
8. Monitoring Commands

Command Reference

Basic Configuration Management Commands

1 Basic Configuration Management Commands
1.1 <1-99>
Use this command to restore the suspended Telnet Client session.
<1-99>

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandUser EXEC mode

Mode

Usage Guide

This command is used to restore the suspended Telnet Client session. Hot keys (ctrl+shift+6 x) areused to exit the Telnet Client session creation. The <1-99> command is used to restore the session. If
the session is created, you can use the show session command to display the session.

Configuration

The following example restores the suspended Telnet Client session.

ExamplesRuijie# 1

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.2 banner exec
Use this command to configure a message to welcome the user entering user EXEC mode throughthe line. Use the no form of this command to restore the default setting.
banner exec c message cno banner exec

Parameter
Description

ParametercDescription
Separator of the message. Delimiters are not allowed in themessage.

1-1Command Reference

message

Defaults

N/A

Command

Global configuration mode

Basic Configuration Management Commands

Contents of the message.

Mode

Usage Guide

This command is used to configure the welcome message. The system discards all the charactersnext to the terminating symbol.
When you are logging in to the device, the MOTD message is displayed at first, and then the banner
login message. After you have logged in, the EXEC message or the incoming message is displayed.
If it’s a reverse Telnet session, the incoming message is displayed. Otherwise, the EXEC message isdisplayed.
The messages are for all lines. If you want to disable display the EXEC message on a specific line,
configure the no exec-banner command on the line.

Configuration

The following example configures a welcome message.

ExamplesRuijie(config)# banner exec $ Welcome $RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.3 banner incoming
Use this command to configure a prompt message for reverse Telnet session. Use the no form of thiscommand to remove the setting.
banner incoming c message cno banner incoming

Parameter
Description

Parametercmessage

Defaults

N/A

Command

Global configuration mode

Description
Separator of the message. Delimiters are not allowed in themessage.
Contents of the message.

Mode

1-2

Command Reference

Usage Guide

Basic Configuration Management Commands

This command is used to configure a prompt message. The system discards all the characters next to
the terminating symbol.
When you are logging in to the device, the MOTD message is displayed at first, and then the banner
login message. After you have logged in, the welcome message or the prompt message is displayed.
If it’s a reverse Telnet session, the prompt message is displayed. Otherwise, the welcome message isdisplayed.

Configuration

The following example configures a prompt message for reverse Telnet session.

ExamplesRuijie(config)# banner incoming $ Welcome $RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.4 banner login
Use this command to configure a login banner. Use no form of this command to r remove the setting.
banner login c message cno banner login

Parameter
Description

Parametercmessage

Defaults

N/A

Command

Global configuration mode

Description
Separator of the message contained in the login banner. Delimiters
are not allowed in the MOTD.
Contents of the login banner

Mode

Usage Guide

This command sets the login banner message, which is displayed at login. The system discards all
the characters next to the terminating symbol.

Configuration

The following example configures a login banner.

ExamplesRuijie(config)# banner login $ enter your password $RelatedCommands

Command

Description

N/A

N/A

1-3

Command Reference

Platform
Description

Basic Configuration Management Commands

N/A

1.5 banner motd
Use this command to set the Message-of-the-Day ( MOTD ) . Use the no form of this command to
remove the setting.
banner [ motd ] c message cno banner [ motd ]Parameter
Description

Parameter

Descriptionc

Separator of the MOTD. Delimiters are not allowed in the MOTD.

message

Contents of an MOTD

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

This command sets the MOTD, which is displayed at login. The letters that follow the separator will
be discarded.

Configuration

The following example configures the MOTD.

ExamplesRuijie(config)# banner motd $ hello,world $RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.6 banner prompt-timeout
Use this command to configure the prompt-timeout message to notify timeout. Use the no form of thiscommand to remove the setting.
banner prompt-timeout c message cno banner prompt-timeout

Parameter
Description

Parameter

Descriptionc

Separator of the message. Delimiters are not allowed in the

1-4Command Reference

Basic Configuration Management Commands

message.
message

Defaults

N/A

Command

Global configuration mode

Contents of the message.

Mode

Usage Guide

The system discards all the characters next to the terminating symbol.
When authentication times out, the banner prompt-timeout message is displayed.

Configuration

The following example configures the prompt-timeout message to notify timeout.

ExamplesRuijie(config)# banner prompt-timeout $ authentication $RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.7 banner slip-ppp
Use this command to configure the slip-ppp message for the SLIP/PPP session. Use the no form of
this command to remove the setting.
banner slip-ppp c message cno banner slip-pp

Parameter
Description

Parametercmessage

Defaults

N/A

Command

Global configuration mode

Description
Separator of the message. Delimiters are not allowed in themessage.
Contents of the message.

Mode

Usage Guide

This command is used to configure the slip-ppp message for the SLIP/PPP session. The system
discards all the characters next to the terminating symbol.
When the SLIP/PPP session is created, the slip-ppp message is displayed on the corresponding
terminal.

1-5Command Reference

Basic Configuration Management Commands

Configuration

The following example configures the banner slip-ppp message for the SLIP/PPP session.

ExamplesRuijie(config)# banner slip-ppp $ Welcome $RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.8 configure
Use this command to enter global configuration mode.
configure [ terminal ]Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example enters global configuration mode.

ExamplesRuijie# configure

Ruijie(config)#
RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.9 disable
Use this command to switch from privileged EXEC mode to user EXEC mode or lower the privilege
level.
disable [ privilege-level ]1-6Command Reference

Parameter
Description

Basic Configuration Management Commands

Parameter

Description

privilege-level

Privilege level

Defaults

N/A

CommandUser EXEC mode

Mode

Usage Guide

Use this command to switch to user EXEC mode from privileged EXEC mode. If a new privilege levelis added, the current privilege level will be lowered.
The privilege level that follows the disable command must be lower than the current level.

Configuration

The following example lowers the current privilege level of the device to level 10.

ExamplesRuijie# disable 10

RelatedCommands

Command

Description
Moves from user EXEC mode enter toprivileged EXEC mode or reaches a higher

enablelevel of authority.

Platform
Description

N/A

1.10 disconnect
Use this command to disconnect the Telnet Client session.
disconnect session-id

Parameter
Description

Parameter

Description

session-id

Telnet Client session ID.

Defaults

N/A

CommandUser EXEC mode

Mode

Usage Guide

This command is used to disconnect the Telnet Client session by setting the session ID.

Configuration

The following example disconnects the Telnet Client session by setting the session ID.

1-7

Command Reference

ExamplesRelatedCommands

Platform
Description

Basic Configuration Management Commands

Ruijie# disconnect 0

Command

Description

N/A

N/A

N/A

1.11 do telnet
Use this command to login to Telnet server.
do telnet host [ port ] [ /source { ip A.B.C.D | ipv6 X:X:X:X::X | interface interface-name } ]Parameter
Description

Parameter

Description

host

IPv4 or host name of Telnet server.

port

Configures TCP port ID. The default is 23.

/sourceSpecifies source IP or source port for Telnet client.

ip A.B.C.D

Specifies source IPv4 address for Telnet client.

ipv6 X:X:X:X::X

Specifies source IPv6 address for Telnet client.

interface interface-nameSpecifies source port for Telnet client.

Defaults

N/A

CommandUser EXEC mode/Privileged EXEC mode/Interface configuration mode

Mode

Usage Guide

N/A

Configuration

The following example configures destination IP address 1.1.1.1.

ExamplesRuijie(config)# do telnet 1.1.1.1

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.12 enable
Use this command to enter privileged EXEC mode.

1-8

Command Reference

Basic Configuration Management Commands

Enable [ privilege-level ]Parameter
Description

Parameter

Description

privilege-level

Privilege level

Defaults

N/A

CommandUser EXEC mode

Mode

Usage Guide

Use this command to enter privileged EXEX mode from User EXEC mode. You can raise or lower theprivilege level by specifying the privilege level.

Configuration

The following example lowers the privilege level to 14:

ExamplesRuijie> enable 14
Password:

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.13 enable password
Use this command to configure passwords for different privilege levels. Use the no form of thiscommand to restore the default setting.
enable password [ level level ] { [ 0 ] password | 7 encrypted-password }no enable password [ level leve l ]Parameter
Description

Parameter

Description

password

Password for the user to enter the EXEC configuration layer

level

User's level.

0

The password is in plain text.

7 encrypted-password

The password is encrypted.

Defaults

N/A

Command

Global configuration mode

1-9

Command Reference

Basic Configuration Management Commands

Mode

Usage Guide

No encryption is required in general. The encryption type must be specified for copying and pasting aencrypted password for the device.
A valid password is defined as follows:Consists of 1-26 upper/lower case letters and numbers



Leading spaces are allowed but usually ignored. Spaces in between or at the end are regarded
as part of the password.
If an encryption type is specified and a plaintext password is entered, you cannot enter
privileged EXEC mode. A lost password that has been encrypted using any method cannot be
restored. In this case, you can only reconfigure the device password. The password must
contain at least three of the following four types of characters: uppercase letters, lowercase
letters, symbols and numbers.

Configuration

The following example configures the password as Nihao123!.

ExamplesRuijie(config)# enable password Nihao123!

RelatedCommands

Platform
Description
enable secretCommand

Description

enable secret

Sets the security password

N/A
Sets the security password

1.14 enable secretUse this command to configure a security password for different privilege levels. Use the no form of
this command to restore the default setting.
enable secret [ level level ] { [ 0 ] password | 5 encrypted-secret }no enable secret [ level level ]Parameter
Description

Defaults

Parameter

Description

secretPassword for the user to enter the EXEC configuration layer

level

User's level.

0

The password is in plain text.

5 encrypted-password

The password is encrypted.

N/A

1-10

Command Reference

Command

Basic Configuration Management Commands

Global configuration mode

Mode

Usage Guide

A password comes under two categories: "password" and "security". "Password" indicates a simple
password, which can be set only for level 15. "Security" means a security password, which can be set
for levels 0-15. If both types of passwords coexist in the system, no "password" type is allowed. If a"password" type password is set for a level other than 15, the system gives an alert and the password
is automatically converted into a "security" password. If a "password" type password is set for level 15
and the same as a "security" password, an alert is given. The password must be encrypted, withsimple encryption for "password" type passwords and security encryption for "security" typepasswords.

Configuration

The following example configures the security password as Nihao123!.

ExamplesRuijie(config)# enable secret 0 Nihao123!

RelatedCommands

Platform
Description

Command

Description

enable password

Sets passwords for different privilege levels.

N/A

1.15 enable service
Use this command to enable or disable a specified service such as SSH Server/Telnet Server/Web
Server/SNMP Agent.
enable service { ssh-sesrver | telnet-server | web-server [ http | https | all ] | snmp-agent }Parameter
Description

Parameterssh-server

telnet-server

Description
Enables SSH Server. IPv4 and IPv6 services are enabled at thesame time.
Enables Telnet Server. IPv4 and IPv6 services are enabled at thesame time.

web-server [ http | https |Enables HTTP Server. IPv4 and IPv6 services are enabled at theall ]same time.

snmp-agent

Enables SNMP Agent. IPv4 and IPv6 services are enabled at thesame time.

Defaults

telnet-server, snmp-agent and web-server are enabled. ssh-server is disabled.

Command

Global configuration mode

Mode

1-11

Command Reference

Usage Guide

Basic Configuration Management Commands

Use this command to enable or disable a specified service. Use the no enable service command todisable the specified service.
The enable service web-server command is followed by three optional keywords: [http | https |all]. If the command is followed by no keyword or by all, the command enables http and https
services. Followed by http, the command enables http service only. Followed by https, thecommand enables https service only.

Configuration

The following example enables the SSH Server.

ExamplesRuijie(Config)# enable service ssh-server

RelatedCommands

Command

Description
Displays the service status in the current

show service

Platform
Description

system.

N/A

1.16 end
Use this command to return to privileged EXEC mode.
end

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

All modes except privileged EXEC mode

Mode

Usage Guide

Use this command to return to privileged EXEC mode.

Configuration

The following example returns to privileged EXEC mode.

ExamplesRuijie#conEnter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#line vty 0
Ruijie(config-line)#end*May 20 09:49:38: %SYS-5-CONFIG_I: Configured from console by console
Ruijie#RelatedCommand

Description

1-12

Command Reference

Basic Configuration Management Commands

Commands
N/A

Platform
Description

N/A

N/A

1.17 exec-banner
Use this command to enable display of the EXEC message on a specific line. Use the no form of thiscommand to restore the default setting.
exec-bannerno exec-banner

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The EXEC message is displayed on all lines by default.

CommandLINE configuration mode

Mode

Usage Guide

After you configure the banner exec and the banner motd commands, the EXEC and the MOTD
messages are displayed on all lines by default. If you want to disable display of the EXEC and the
MOTD messages on a specific line, configure the no form of this command on the line.
This command does not work for the banner incoming message. If you configure the bannerincoming command, the banner incoming message is displayed on all reverse Telnet sessions
and the display cannot be disabled on a specific line.

Configuration

The following example disables display of the EXEC message on line VTY 1.

ExamplesRuijie(config)# line vty 1

Ruijie(config-line)no exec-banner
RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1-13

Command Reference

Basic Configuration Management Commands

1.18 exec-timeout
Use this command to configure connection timeout for this device in LINE mode. Use the no form of
this command to restore the default setting and the connection never expires.
exec-timeout minutes [ seconds ]no exec-timeout

Parameter
Description

Parameter

Description

minutes

Timeout in minutes.

seconds(Optional) Timeout in minutes

Defaults

The default is 10 minutes.

CommandLine configuration mode

Mode

Usage Guide

If there is no input or output for this connection within a specified time, this connection will expire, andthis LINE will be restored to the free status.

Configuration

The following example sets the connection timeout to 5’30’’.

ExamplesRuijie(config-line)#exec-timeout 5 30

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.19 execute
Use this command to execute a command on the file.
execute { [ flash: ] filename }Parameter
Description

Parameter

Description

filename

Specifies the file path.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

1-14

Command Reference

Basic Configuration Management Commands

Usage Guide

N/A

Configuration

The following example executes a command to configure an IP address for the specified interface.

ExamplesRuijie#execute flash:mybin/config.text
executing script file mybin/config.text ......
executing done
Ruijie#config
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#interface vlan 1
Ruijie(config-if-VLAN 1)#ip address 192.168.21.158 24
Ruijie(config-if-VLAN 1)#end*Sep 29 23:35:49: %SYS-5-CONFIG_I: Configured from console by console

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.20 exit
Use this command to return to the upper configuration mode.
exit

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

All configuration modes

Mode

Usage Guide

N/A

Configuration

The following example returns to the upper configuration mode.

ExamplesRuijie#conEnter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#line vty 0
Ruijie(config-line)#end*May 20 09:49:38: %SYS-5-CONFIG_I: Configured from console by console
Ruijie#con

1-15

Command Reference

Basic Configuration Management Commands

Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#line vty 0
Ruijie(config-line)#exit
Ruijie(config)#exit*May 20 09:51:48: %SYS-5-CONFIG_I: Configured from console by console
Ruijie#exit
Press RETURN to get started

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.21 help
Use this command to display the help information.
help

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

Any mode

CommandMode

Usage Guide

This command is used to display brief information about the help system. You can use ”?” to display
all commands or a specified command with its parameters.

Configuration

The following example displays brief information about the help system.

ExamplesRuijie#help
Help may be requested at any point in a command by entering
a question mark '?'. If nothing matches, the help list will
be empty and you must backup until entering a '?' shows theavailable options.
Two styles of help are provided:
1. Full help is available when you are ready to enter acommand argument (e.g. 'show ?') and describes each possible
argument.
2. Partial help is provided when an abbreviated argument is entered

1-16

Command Reference

Basic Configuration Management Commands

and you want to know what arguments match the input(e.g. 'show pr?'.)
The following example displays all available commands in interface configuration mode.
Ruijie(config-if-GigabitEthernet 0/17)#?
Interface configuration commands:
arp-check

Port-security arp-checkbandwidth

Set bandwidth informational parameter

bpdu

Bridge Protocol Data Unit

carrier-delay

Specify delay for interface transitions

default

Set a command to its defaults

description

Interface specific description

doTo run exec commands in config mode

dot1q

The dot1q configuration

dot1q-Tunnel

Configure dot1q-tunnel port

duplexConfigure duplex operationeee

Set eee

efm

Config efm for an interface

end

Exit from interface configuration mode

errdisable

Error disable

exit

Exit from interface configuration mode

expertExpert extended ACL

flowcontrol

Set the flow-control value for an interface

frame-tag

Server Manufacturer Ethernet Frame Tag

full-duplex

Force full duplex operation

globalGlobal ACL

gvrp

GVRP configure command

half-duplex
help

Force half duplex operation
Description of the interactive help system

inner-priority-trust

Copy inner-tag priority to outer-tag

ipInterface Internet Protocol config commands

ipv6

IPv6 information

l2protocol-tunnel
lacp

Tunnel protocol
LACP interface subcommands

line-detect

Detect the state of line

link

Configure link

lldp

Link Layer Discovery Protocolload-intervalSpecify interval for load calculation for aninterfacelogging

Configure logging for interfacemac

Mac extended ACL

mac-address-learning

Modify MAC Address learning for the interface

mac-address-table

Configure mac-address table

mac-vlan

Mac vlan

max-dynamic-mac-count Config dynamic MAC limit of the Interface

1-17

Command Reference

Basic Configuration Management Commands

mls

Configure MultiLayer Switching characteristics

mtu

Set the interface Maximum Transmission Unit (MTU)

nac-author-user

Config max nac user number

negotiation

Set switchport negotiationnoNegate a command or set its defaults

port-group

Aggregateport/port bundling configuration

pppoe

Pppoe

qos

Configure qos information

rate-limit

Configure rate-limit

redirect

Redirect packets

rldp

Rldp interface configuration

rmon

Rmon commandservice-policy

Configure QoS Service Policy

showShow running system information

shutdown

Shutdown the selected interface

snmp

Modify SNMP interface parameters

spanning-tree
speed

Spanning Tree Subsystem
Configure speed operation

storm-control

Storm configuration

switchport

Set switching mode characteristics

traffic-redirect

Redirect the traffic

virtual-group

Virtual-groupvlan-mapping-in

Vlan mapping invlan-mapping-out

Vlan mapping out

wfq-queue

Configure Weighted Fair Queue queues

wrr-queue

Configure weighted round-robin xmt queues

The following example displays the parameters of a specified command.
Ruijie(config)#access-list 1 permit ?
A.B.C.D Source address
any

host
RelatedCommands

Platform
Description

Any source hostA single source hostCommand

Description

N/A

N/A

N/A

1.22 hostname
Use this command to specify or modify the hostname of a device.
hostname name1-18

Command Reference

Parameter
Description

Basic Configuration Management Commands

Parameter

Description

nameDevice hostname, string, number or hyphen, up to 63 characters.

Defaults

The default is Ruijie.

Command

Global configuration mode

Mode

Usage Guide

This hostname is mainly used to identify the device and is taken as the username for the local device
during dialup and CHAP authentication.

Configuration

The following example configures the hostname of the device as BeiJingAgenda.

ExamplesRuijie(config)# hostname BeiJingAgenda
BeiJingAgenda(config)#

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.23 ip telnet source-interface
Use this command to configure the IP address of an interface as the source address for Telnet
connection.
ip telnet source-interface interface-nameParameter
Description

Parameter

Description
Configures the IP address of the interface, including AP port, Gi port,interface-nameLoopback port, null port, Tunnel port and VLAN port, as the source
address for Telnet connection.

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

This command is used to specify the IP address of an interface as the source address for global
Telnet connetction. When using the telnet command to log in a Telnet server, apply the global setting
if no source interface or source address is specified. Use the no ip telnet source-interface
command to restore it to the default setting.

1-19

Command Reference

Basic Configuration Management Commands

Configuration

The following example

configures the IP address of the Loopback1 interface as the source address

Examplesfor global Telnet connection.
Ruijie(Config)# ip telnet source-interface Loopback 1

RelatedCommands

Platform
Description

Command

Description

telnetLogs in a Telnet server.

N/A

1.24 lockUse this command to set a temporary password for the terminal.
lock

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandUser EXEC mode

Mode

Usage Guide

You can lock the terminal interface and maintain the session continuity to prevent access to theinterface by setting a temporary password. Take the following steps to lock the terminal interface:Enter the lock command, and the system will prompt you for a password:Enter the password, which can be any character string. The system will prompt you to confirm
the password, clear the screen, and display the "Locked" information.

To access the terminal, enter the preset temporary password.

To lock the terminal, run the lockable command in line configuration mode and enable terminal
locking in the corresponding line.

Configuration

The following example locks a terminal interface.

ExamplesRuijie(config-line)# lockable
Ruijie(config-line)# end
Ruijie# lockPassword: <password>
Again: <password>
LockedPassword: <password>
Ruijie#1-20

Command Reference

RelatedCommands

Platform
Description

Basic Configuration Management Commands

Command

Description

lockable

Supports terminal locking in the line.

N/A

1.25 lockable
Use this command to support the lock command at the terminal. Use the no form of this command torestore the default setting.
lockableno lockableParameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is disabled by default.

CommandLINE configuration mode

Mode

Usage Guide

This command is used to lock a terminal interface in the corresponding line. To lock the terminal, run
the lock command in EXEC mode. Run the lockable command before running the lock command.

Configuration

The following example enables terminal locking at the console port and locks the console.

ExamplesRuijie(config)# line console 0
Ruijie(config-line)# lockable
Ruijie(config-line)# end
Ruijie# lockPassword: <password>
Again: <password>
LockedPassword: <password>

RelatedCommands

Platform
Description

Command

Description

lock

Locks the terminal.

N/A

1-21

Command Reference

Basic Configuration Management Commands

1.26 login
Use this command to enable simple login password authentication on the interface if AAA is disabled.
Use the no form of this command to restore the default setting.
login
no loginParameter
Description

Parameter

Description

N/A

N/A

Defaults

Login is disabled for console and enabled for VTY by default.

CommandLine configuration mode

Mode

Usage Guide

If the AAA security server is inactive, this command enables simple password authentication at login.
The password is configured for a VTY or console interface.

Configuration

The following example sets a login password authentication on VTY.

ExamplesRuijie(config)# no aaa new-model
Ruijie(config)# line vty 0
Ruijie(config-line)# password 0 normatest
Ruijie(config-line)# login

RelatedCommands

Platform
Description

Command

Description

password

Configures the line login password

N/A

1.27 login access non-aaa
Use this command to configure non-AAA authentication on line when AAA is enabled. Use the noform of this command to restore the default setting.
login access non-aaa
no login access non-aaa

Parameter
Description

Parameter

Description

N/A

N/A

1-22

Command Reference

Basic Configuration Management Commands

Defaults

This function is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example configures VTY line authentication with AAA enabled.

ExamplesRuijie(config)#log access non-aaa
Ruijie(config)#aaa new-model
Ruijie(config)#line vty 0 4
Ruijie(config-line)#login local
Ruijie(config-line)#

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.28 login authentication
If the AAA is enabled, login authentication must be performed on the AAA server. Use this commandto associate login authentication method list. Use the no form of this command to restore the default
setting.
login authentication { default | list-name }no login authentication { default | list-name }Parameter
Description

Parameter

Description

default

Name of the default authentication method list

list-nameName of the method list

Defaults

Default authentication is used when AAA is enabled.

CommandLine configuration mode

Mode

Usage Guide

Configuration

The following example associates the method list on VTY and perform login authentication on a

Examplesradius server.
Ruijie(config)# aaa new-model

1-23

Command Reference

Basic Configuration Management Commands

Ruijie(config)# aaa authentication login default radius
Ruijie(config)# line vty 0
Ruijie(config-line)# login authentication default

RelatedCommands

Platform
Description

Command

Description

aaa new-model

Enables the AAA security service.

aaa authentication login

Configures the login authentication method list.

N/A

1.29 login local
Use this command to enable local user authentication on the interface if AAA is disabled. Use the noform of this command to restore the default setting.
login local
no login local

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandLine configuration mode

Mode

Usage Guide

If the AAA security server is inactive, this command is used for local user login authentication. The
user is allowed to use the username command.

Configuration

The following example sets local user authentication on VTY.

ExamplesRuijie(config)# no aaa new-model
Ruijie(config)# username test password 0 test
Ruijie(config)# line vty 0
Ruijie(config-line)# login local

RelatedCommands

Platform
Description

Command

Descriptionusername

Configures local user information.

N/A

1-24

Command Reference

Basic Configuration Management Commands

1.30 login privilege log
Use this command to log privilege change. Use the no form of this command to restore the default
setting.
login privilege log
no login privilege log

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This command is disabled by default.

Command

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example enables the function of logging privilege change.

ExamplesRuijie(config)# login privilege log
The following example displays the log of privilege change failure.
Ruijie>enable 10
Password:
Password:
Password:% Access denied
Ruijie>*Sep 10 11:34:19: %SYS-5-PRIV_AUTH_FAIL: Authentication toprivilege level 10 from console failed
The following example displays the log of privilege change success.
Ruijie>enable 10
Password:
Ruijie#*Sep 10 11:34:20: %SYS-5-PRIV_AUTH_SUCCESS: Authentication toprivilege level 10 from console success
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

1-25

Command Reference

Basic Configuration Management Commands

Description

1.31 motd-banner
Use this command to enable display of the MOTD message on a specified line. Use the no form of
this command to restore the default setting.
motd-banner
no motd-banner

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The MOTD message is displayed on all lines by default.

CommandLine configuration mode

Mode

Usage Guide

After you configure the banner exec and the banner motd commands, the EXEC and the MOTD
messages are displayed on all lines by default. If you want to disable display of the EXEC and the
MOTD messages on a specific line, configure the no form of this command on the line.
This command does not work for the incoming message. If you configure the banner incoming
command, the banner incoming message is displayed on all reverse Telnet sessions and thedisplay cannot be disabled on a specific line.

Configuration

The following example disables display of the MOTD message on VTY 1.

ExamplesRuijie(config)# line vty 1

Ruijie(config-line)no motd-banner
RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.32 password
Use this command to configure a password for line login, run the password command. Use the noform of this command to restore the default setting.
password { [ 0 ] password | 7 encrypted-password }no password

1-26

Command Reference

Parameter
Description

Basic Configuration Management Commands

Parameter

Description

password

Password for remote line login

0

The password is in plain text.

7 encrypted-password

The password is encrypted.

Defaults

N/A

CommandLine configuration mode

Mode

Usage Guide

Configuration

The following example configures the line login password as "red".

ExamplesRuijie(config)# line vty 0
Ruijie(config-line)# password red

RelatedCommands

Command

Description
Moves from user EXEC mode to privileged
EXEC mode or enables a higher level of

login

authority.

Platform
Description

N/A

1.33 prompt
Use this command to set the prompt command. Use the no form of this command to restore thedefault setting.
prompt string

Parameter
Description

Parameter

Description

stringCharacter string of the prompt command, containing up to 32 letters.

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

If no prompt string is configured, the system name applies and varies with the system name. The
prompt command is valid only in EXEC mode.

1-27

Command Reference

Basic Configuration Management Commands

Configuration

The following example sets the prompt string to rgnos.

ExamplesRuijie(config)# prompt string
Ruijie(config)# end

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.34 secretUse this command to set a password encrypted by irreversible MD5 for line login. Use the no form of
this command to restore the default setting.
secret { [ 0 ] password | 5 encrypted-secret }no secretParameter
Description

Parameter

Description(Optional) sets the plaintext password text and encrypts it with0

irreversible MD5 after configuration.

password
5 encrypted-secretDefaults

N/A

CommandLine configuration mode

Sets the password plaintext, a string ranging from 1 to 25 characters.
Sets the password text encrypted by irreversible MD5 and saves it as
the encrypted password after configuration.

mode

Usage Guide

This command is used to set a password encrypted by irreversible MD5 that is authenticated by aremote user through line login.
If the specified encryption type is 5, the logical length of the cipher text to be entered must be 24
and the 1st, 3rd and 8th characters of the password text must be $.
In general, the encryption type does not need to be specified as 5 except when the encrypted
password is copied and pasted.
Line mode allows configuration of both “password” and “secret” types passwords at the sametime. When the two passwords are the same, the system will send alert notification but theconfiguration will be permitted. When the system is configured with the two passwords, if theuser enters a password that does not match the “secret” type password, it will not continue tomatch the “password” type password and login fails, enhancing security for the system

1-28

Command Reference

Basic Configuration Management Commands

password.

Configuration

The following example sets the password encrypted by irreversible MD5 for line login to vty0.

ExamplesRuijie(config)# line vty 0
Ruijie(config-line)# secret vty0
The following displays the encryption outcome by running the show command.
secret 5 $1$X834$wvx6y794uAD8svzD

RelatedCommands

Command

Description

login

Sets simple password authentication on theinterface as the login authentication mode

Platform

N/A

Description

1.35 session-timeout
Use this command to configure the session timeout for a remote terminal. Use the no form of thiscommand to restore the default setting and the session never expires.
session-timeout minutes [ output ]no session-timeout

Parameter
Description

Parameter

Description

minutes

Timeout in minutes.

outputDefaults

The default timeout is 0.

CommandLINE configuration mode

Regards data output as the input to determine whether the session
expires.

Mode

Usage Guide

If no input or output in current LINE mode is found on the remote terminal for the session within a
specified time, this connection will expire, and this LINE will be restored to the free status.

Configuration

The following example specifies the timeout as 5 minutes.

ExamplesRuijie(config-line)#session-timeout 5 output

RelatedCommands

Command

Description

N/A

N/A

1-29

Command Reference

Platform
Description

Basic Configuration Management Commands

N/A

1.36 show debugging
Use this command to display debugging state.
show debugging

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays debugging state.

ExamplesRuijie#show debugging
debug fw-group detect intf-state

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.37 show line
Use this command to display the configuration of a line.
show line { console line-num | vty line-num | line-num }Parameter
Description

Parameter

Description

consoleDisplays the configuration of a console line.

vty

Displays the configuration of a vty line.

line-num

Number of the line.

1-30

Command Reference

Basic Configuration Management Commands

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the configuration of a console port.

ExamplesRuijie# show line console 0
CON

Type

speed

Overruns

* 0

CON

9600

45927

Line 0, Location: "", Type: "vt100"
Length: 24 lines, Width: 79 columns
Special Chars: Escape^^xTimeouts:

Disconnect Activation

none

^M

Idle EXEC

Idle Session

never

never

History is enabled, history size is 10.
Total input: 53564 bytes
Total output: 395756 bytes
Data overflow: 27697 bytes
stop rx interrupt: 0 times

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.38 show reload
Use this command to display the system restart settings.
show reload

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

1-31

Command Reference

Basic Configuration Management Commands

Usage Guide

Configuration

The following example displays the restart settings of the system.

ExamplesRuijie# show reload
Reload scheduled in 595 seconds.
At 2003-12-29 11:37:42
Reload reason: test.

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.39 show running-config
Use this command to display how the current device system is configured.
show running-config

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

N/A

ExamplesRelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1-32

Command Reference

Basic Configuration Management Commands

1.40 show service
Use this command to display the service status.
show service

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays whether the service is enabled or disabled.

ExamplesRuijie# show service
web-server: disabledweb-server(https): disabledsnmp-agent: enabledssh-server: enabled

telnet-server : disabled
RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.41 show sessions
Use this command to display the Telnet Client session information.
show sessions

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandUser EXEC mode

1-33

Command Reference

Basic Configuration Management Commands

Mode

Usage Guide

Telnet Client session information includes the VTY number and the server IP address.

Configuration

The following example displays the Telnet Client session information.

ExamplesRuijie#show sessions
Conn Address

RelatedCommands

Platform
Description*1

127.0.0.1*2

192.168.21.122

Command

Description

N/A

N/A

N/A

1.42 show startup-config
Use this command to display the device configuration stored in the Non Volatile Random Access
Memory (NVRAM).
show startup-config

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

The device configuration stored in the NVRAM is executed while the device is starting.
On a device that does not support boot config, startup-config is contained in the default
configuration file /config.text in the built-in flash memory.

Configuration

N/A

Examples1-34

Command Reference

RelatedCommands

Platform
Description

Basic Configuration Management Commands

Command

Description

boot config

Sets the name of the boot configuration file.

N/A

1.43 show thisUse this command to display effective configuration in the current mode.
show thisParameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

Command

All modes.

Mode

Usage Guide

The configuration in the following range modes cannot be displayed. If the show this command isrun, the outcome is NULL.
1.

Use the line first-line last-line command to configure lines in a continuous group and enter LINE
configuration mode.

2.

Use the vlan range command to configure VLANs and enter vlan range configuration mode.

3.

Use the interface range command to configure interfaces and enter interface range
configuration mode.
In vlan range or interface range mode, if the number of VLANs or interfaces exceeds 50, theconfiguration of the first 50 VLANs or interfaces will be displayed.

Configuration

Use this command to display effective configuration on interface fastEthernet 0/17.

ExamplesRuijie (config)#interface fastEthernet 0/17
Ruijie (config-if-FastEthernet 0/17)#show thisBuilding configuration...
!
spanning-tree link-type point-to-point
spanning-tree mst 0 port-priority 0!
end
Ruijie (config-if-FastEthernet 0/17)#

1-35

Command Reference

Basic Configuration Management Commands

Use this command to display configuration on interface VLAN 1-3.
Ruijie(config-if-range)#show thisBuilding configuration...
!
interface VLAN 1
ip address dhcp
interface VLAN 2
ip address 1.1.1.1 255.255.255.0
interface VLAN 3
ip address 3.3.3.3 255.255.255.0!
end
Ruijie(config-if-range)#

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.44 speed
Use this command to set the speed at which the terminal transmits packets. Use the no form of thiscommand to restore the default setting.
speed speed
no speedParameter
Description

Parameter

Description
Transmission rate (bps) on the terminal. For serial ports, optional

speed

rates include 9600, 19200, 38400, 57600, and 115200 bps. The
default rate is 9600 bps.

Defaults

The default is 9600.

CommandLINE configuration mode

Mode

Usage Guide

This command is used to set the speed at which the terminal transmits packets.

Configuration

The following example sets the rate of the serial port to 57600 bps.

ExamplesRuijie(config)# line console 0

1-36

Command Reference

Basic Configuration Management Commands

Ruijie(config-line)# speed 57600

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.45 telnet
Use this command to log in a server that supports telnet connection.
telnet host [ port ] [ /source { ip A.B.C.D | ipv6 X:X:X:X::X | interface interface-name } ]Parameter
Description

Parameter

Description

host

The IP address of the host or host name you want to log in.

port

Selects the TCP port number for login, 23 by default.

/sourceSpecifies the source IP address or source interface used by the
Telnet client.

ip A.B.C.D

Specifies the source IPv4 address used by the Telnet client.

ipv6 X:X:X:X::X

Specifies the source IPv6 address used by the Telnet client.

interface interface-nameSpecifies the source interface used by the Telnet client.

Defaults

N/A

CommandUser EXEC mode

Mode

Usage Guide

Configuration

The following example sets telnet to IP address 10.0.0.1.

ExamplesRuijie# telnet 10.0.0.1

RelatedCommands

Command

Description
Specifies the IP address of the interface as theip telnet source-interface

source address for Telnet connection.
Displays the currently established Telnet

show sessions

sessions.
Exits current connection.

exit

Platform

N/A

1-37

Command Reference

Basic Configuration Management Commands

Description

1.46 username
Use this command to set a local username and optional authorization information. Use the no form of
this command to restore the default setting.
username name [ login mode { aux | console | ssh | telnet } ] [ online amount number ][ permission oper-mode path ] [ privilege privilege-level ] [ reject remote-login ] [ web-auth ][ pwd-modify ] [ nopassword | password [ 0 | 7 ] text-string | secret [ 0 | 5] text-string]no username nameParameter
Description

Parameter

Description

name

Usernamelogin mode

Sets the login mode.

aux

Sets the login mode to aux.

consoleSets the login mode to console.

ssh

Sets the login mode to ssh.

telnet

Sets the login mode to telnet.

online amount number

Sets the amount of users online simultaneously.

permission oper-mode path

Sets the permission on the specified file. op-mode refers to theoperation mode and path to the file or the directory path.

privilege privilege-level

Sets the privilege level, in the range from 0 to 15.

reject remote-login

Confines the account to remote login.

web-authConfines the account to web authentication.

pwd-modify
nopassword
password [ 0 | 7 ] text-string

secret [ 0 | 5 ] text-string

Defaults

N/A

Command

Global configuration mode

Allows the web authentication user of this account to change thepassword. It works only when the web-auth command is configured.
The account is not configured with a password.
If the password type is 0, the password is in plain text. If the type is 7,
the password is encrypted. The password is in plain text by default.
If the password type is 0, the password is in plain text. If the type is 5,
the password is encrypted. The password is in plain text by default.

Mode

Usage Guide

This command is used to establish a local user database for authentication.
If encryption type is 7, the cipher text you enter should contain seven characters to be valid.
In general, do not set the entryption type 7.
Instead, specify the type of encryption as 7 only when the encrypted password is copied andpasted.

1-38

Command Reference

Basic Configuration Management Commands

Configuration

The following example configures a username and password and binds the user to level 15.

ExamplesRuijie(config)# username test privilege 15 password 0 Nihao123!
The following example configures the username and password exclusive to web authentication.
Ruijie(config)# username user1 web-auth password 0 Nihao123!
The following example configures user test with read and write permissions on all files anddirectories.
Ruijie(config)# username test permission rw /The following example configures user test with read, write and execute permissions on all files anddirectories except the confix.text file.
Ruijie(config)# username test permission n /config.text

Ruijie(config)# username test permission rwx /RelatedCommands

Platform
Description

Command

Description

login local

Enables local authentication

N/A

1.47 username import
Use this command to import user information from the file.
username import filename

Parameter
Description

Parameter

Description

filename

The file name.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to import user information from the file.

Configuration

The following example imports user information from the file.

ExamplesRuijie# username import user.csv

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

1-39

Command Reference

Basic Configuration Management Commands

Description

1.48 username export
Use this command to export user information to the file.
username export filename

Parameter
Description

Parameter

Description

filename

The file name.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to export user information to the file.

Configuration

The following example exports user information to the file.

ExamplesRuijie# username export user.csv

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1.49 write
Use this command to save running-config at a specified location.
write [ memory | terminal ]Parameter
Description

Parameter

memoryterminal

Defaults

N/A

CommandPrivileged EXEC mode

Description
Writes the system configuration (running-config) into NVRAM, whichis equivalent to copy running-config startup-config.
Displays the system configuration, which is equivalent to showrunning-config.

1-40

Command Reference

Basic Configuration Management Commands

Mode

Usage Guide

Despite the presence of alternative commands, these commands are widely used and accepted.
Therefore, they are reserved to facilitate user operations.
The system automatically creates the specified file and writes it into system configuration if the device
that stores the file exists;
The system will ask you whether to save the current configuration in default boot configuration file/config.text and perform an action as required if the device that stores the file does not exist possibly
because the boot configuration file is stored on a removable storage device, and the device has notbeen loaded when you run the write [ memory ] command.

Configuration

The following example saves running-config at a specified location.

ExamplesRuijie# write
Building configuration...

[OK]
RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

1-41

Command Reference

LINE Commands

2 LINE Commands
2.1 absolute-timeout
Use this command to set the absolute timeout period. Use the no form of this command to restore thedefault setting.
absolute-timeout minutes
no absolute-timeout

Parameter
Description

Parameter

Description

minutes

Sets the absolute timeout period, in the range from 0 to 60.

Defaults

No absolute timeout period is set by default.

CommandLINE configuration mode

Mode

Usage Guide

If the absolute timeout period is configured, the line is disconnected once the timeout timer
expires, Before the terminal logs out, a message is displayed to prompt the remaining time.
Terminal will be login out after 20 second

Configuration

The following example sets the timeout period for the line between two consoles to 2 minutes.

ExamplesRuijie(config)# line console 0

Ruijie(config-line)#absolute-timeout 2
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.2 access-class
Use this command to control login into the terminal through IPv4 ACL. Use the no form of thiscommand to restore the default setting.
access-class { access-list-number | access-list-name } { in | out }no access-class { access-list-number | access-list-name } { in | out }Parameter
Description

Parameter

Description

2-1

Command Reference

LINE Commands

Specifies the ACL number. Standard IP ACL number is from 1 to 99
access-list-number

and from 1300 to 1999. Extended IP ACL number is from 100 to 199
and from 2000 to 2699.

access-list-nameSpecifies the ACL name.

inFilters the incoming connections.

out

Filters the outgoing connections.

Defaults

N/A

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example uses ACL 20 to filter the incoming connections in line VTY 0 5.

ExamplesRuijie(config)# line vty 0 5
Ruijie(config-line)access-class 20 in
The following example uses the ACL named “test” to filter the outgoing connections in line VTY 6 7.
Ruijie(config)# line vty 6 7

Ruijie(config-line)access-class test out
RelatedCommands

Platform

Command

Description

show running

Displays status information

N/A

Description

2.3 accounting commands
Use this command to enable command accounting in the line. Use the no form of this command torestore the default setting.
accounting commands level { default | list-name }no accounting commands level

Parameter
Description

Parameterlevel

Description
Command level ranging from 0 to 15. The command of this level isaccounted when it is executed.

default

Default authorization list name.

list-name

Optional list name.

2-2

Command Reference

LINE Commands

Defaults

This function is disabled by default.

CommandLine configuration mode

Mode

Usage Guide

This function is used together with AAA authorization. Configure AAA command accounting first, andthen apply it on the line.

Configuration

The following example enables command accounting in line VTY 1 and sets the command level to 15.

ExamplesRuijie(config)# aaa new-model
Ruijie(config)# aaa accounting commands 15 default start-stop group tacacs+
Ruijie(config)# line vty 1

Ruijie(config-line)# accounting commands 15 default
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.4 accounting exec
Use this command to enable user access accounting in the line. Use the no form of this command torestore the default setting.
accounting commands { default | list-name }no accounting commands

Parameter
Description

Parameter

Description

default

Default authorization list name.

list-name

Optional list name.

Defaults

This function is disabled by default.

CommandLine configuration mode

Mode

Usage Guide

This function is used together with AAA authorization. Configure AAA EXEC accounting first, andthen apply it on the line.

Configuration

The following example enables user access accounting in line VTY 1.

ExamplesRuijie(config)# aaa new-model
Ruijie(config)# aaa accounting exec default start-stop group radius

2-3Command Reference

LINE Commands

Ruijie(config)# line vty 1

Ruijie(config-line)# accounting exec default
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.5 activation-character
Use this command to set the ASCII value of the character for activating the terminal session. Use theno form of this command to restore the default setting.
activation-character ascii-value
no activation-character

Parameter
Description

Parameter

Description

ascii-value

Sets the ASCII value of the character for activating the terminal
session, in the range from 0 to 127.

Defaults

The default is CR (ASCII: 0x0D).

CommandLINE configuration mode

Mode

Usage Guide

If the current line is configured with the autoselect function, ascii-value must be set to 0x0D.

Configuration

The following example configures Ctrl+Y (ASCII: 25) for activating the terminal session.

ExamplesRuijie(config)#line console 0
Ruijie(config-line)#activation-character 25
Ruijie(config-line)#end
Ruijie#exit
Press CTRL+y to get started

Ruijie>RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

2-4

Command Reference

LINE Commands

Description

2.6 authorization commands
Use this command to enable authorization on commands, Use the no form of this command torestore the default setting.
authorization commands level { default | list-name }no authorization commands level

Parameter
Description

Parameterlevel

Description
Command level ranging from 0 to 15. The command of this level is
executed after authorization is performed.

default

Default authorization list name,list-name

Optional list name.

Defaults

This function is disabled by default.

CommandLine configuration mode

Mode

Usage Guide

This function is used together with AAA authorization. Configure AAA authorization first, and thenapply it on the line.

Configuration

The following example enables authorization on commands of level 15 in line VTY 1.

ExamplesRuijie(config)# aaa new-model
Ruijie(config)# aaa authorization commands 15 default group tacacs+
Ruijie(config)# line vty 1

Ruijie(config-line)# authorization commands 15 default
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.7 authorization exec
Use this command to enable EXEC authorization for the line. Use the no form of this command torestore the default setting.
authorization { default | list-name }no authorization exec

2-5

Command Reference

Parameter
Description

LINE Commands

Parameter

Description

default

Default authorization list name,list-name

Optional list name.

Defaults

This function is disabled by default,

CommandLine configuration mode

Mode

Usage Guide

This function is used together with AAA authorization. Configure AAA EXEC authorization first, andthen apply it on the line.

Configuration

The following example performs EXEC authorization to line VTY 1.

ExamplesRuijie(config)# aaa new-model
Ruijie(config)# aaa authorization exec default group radius
Ruijie(config)# line vty 1

Ruijie(config-line)# authorization exec default
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.8 autocommand
Use this command to enable automatic command execution. Use the no form of this command torestore the default setting.
autocommand autocommand-string
no autocommand

Parameter
Description

Parameter

Description

autocommand-string

Enables automatic command execution.

Defaults

This function is disabled by default.

CommandLINE configuration mode

Mode

Usage Guide

This command is used to enable the dumb terminal to log in to the specified host through Telnet or to

2-6

Command Reference

LINE Commands

obtain the specified app-based terminal service.

Configuration

The following example enables automatic command execution and connects to line vty 0.

ExamplesRuijie(config)# line vty 0
Ruijie(config-line)# autocommand telnet 192.168.21.100//Initiates connection to line vty 0:
Trying 192.168.21.100, 23...
Ruijie#show users
Line

User

Host(s)

Idle

Location---------------- ------------ -------------------- ---------------------------

RelatedCommands

Platform

0 con 0---idle

00:01:31---* 1 vty 0

---

idle

00:00:00

192.168.21.200

Command

Description

N/A

N/A

N/A

Description

2.9 clear line
Use this command to clear connection status of the line.
clear line { console line-num | vty line-num | line-num }Parameter
Description

Parameter

Description

consoleClears connection status of the console line.

vty

Clears connection status of the virtual terminal line.

line-numSpecifies the line to be cleared.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

This command is used to clear connection status of the line and restore the line to the unoccupied
status to create new connections.

Configuration

The following example clears connection status of line VTY 13. The connected session on the client

2-7

Command Reference

ExamplesLINE Commands(such as Telnet and SSH) in the line is disconnected immediately.
Ruijie# clear line vty 13

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.10 databits
Use this command to set the databit number for every character on the async line in flow
communication mode. Use the no form of this command to restore the default setting.
databits bit
no databits

Parameter
Description

Parameter

Description

bit

Sets the databit number of every character, in the range from 5 to 8.

Defaults

The default is 8.

CommandLINE configuration mode

Mode

Usage Guide

The async line device generates 7 databits with parity check in flow communication mode. If parity
check is enabled, the databit number is 7. Otherwise, the databit number is 8. The databit number
may set to 5 or 6 on the earlier device.

Configuration

The following example sets the databit number for every character on the async line in flow

Examplescommunication mode to 7.
Ruijie(config)# line console 0

Ruijie(config-line)#databits 7
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-8

Command Reference

LINE Commands

2.11 disconnect-character
Use this command to set the hot key that disconnects the terminal service connection. Use the noform of this command to restore the default setting.
disconnect-character ascii-value
no disconnect-character

Parameter
Description

Parameter

Description

ascii-value

ASCII decimal value of the hot key that disconnects the terminal
service connection, in the range from 0 to 255.

Defaults

The default hot key is Ctrl+D and the ASCII decimal value is 0x04.

CommandLine configuration mode

Mode

Usage Guide

This command is used to set the hot key that disconnects the terminal service connection. The hot
key cannot be the commonly used ASCII node such as characters ranging from a to z, from A to Z or
numbers ranging from 0 to 9. Otherwise, the terminal service cannot operate properly.

Configuration

The following example sets the hot key that disconnects the terminal service connection on line VTY

Examples0 5 to Ctrl+E (0x05).
Ruijie(config)# line vty 0 5

Ruijie(config-line)# disconnect-character 5
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.12 escape-character
Use this command to set the escape character for the line. Use the no form of this command torestore the default setting.
escape-character escape-value
no escape-character

Parameter
Description

Parameter

Description

escape-value

Sets the ASCII value corresponding to the escape character for the

2-9Command Reference

LINE Commands

line, in the range from 0 to 255.

Defaults

The default escape character is Ctrl+^ (Ctrl+Shift+6) and the ASCII decimal value is 30.

CommandLine configuration mode

Mode

Usage Guide

After configuring this command, press the key combination of the escape character and then press x,
the current session is disconnected to return to the original session.

Configuration

The following example sets the escape character for the line to 23 (Ctrl+w).

ExamplesRuijie(config)# line vty 0

Ruijie(config-line)# escape-character 23
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.13 exec
Use this command to enable the line to enter the command line interface. Use the no form of thiscommand to disable the function.
exec
no exec

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

This function is enabled by default.

CommandLine configuration mode

Mode

Usage Guide

The no exec command is used to ban the line from entering the command line interface. You have toenter the command line interface through other lines.

Configuration

The following example bans line VTY 1 from entering the command line interface.

ExamplesRuijie(config)# line vty 1
Ruijie(config-line)# no exec
Ruijie# show users

2-10Command ReferenceLine

LINE Commands
User

Host(s)

Idle

Location---------------- ------------ -------------------- --------------------------* 0 con 0

---

idle

00:00:00---

1 vty 0---idle

00:01:03

20.1.1.2

3 vty 2
RelatedCommands

Platform

---

idle

00:00:13

Command

Description

N/A

N/A

20.1.1.2

N/A

Description

2.14 exec-character-bits
Use this command to configure the coded character set for the async line. Use the no form of thiscommand to restore the default setting.
exec-character-bits { 7 | 8 }no exec-character-bits

Parameter
Description

Parameter

Description

7

Configures a 7-bit coded character set.

8

Configures an 8-bit coded character set.

Defaults

The default is 8.

CommandLINE configuration mode

Mode

Usage Guide

If you want to enter Chinese characters in the command line or display Chinese characters, graphs orother international characters, configure the exec-character-bits 8 command.

Configuration

The following example configures a 7-bit coded character set for the async line.

ExamplesRuijie(config)# line console 0

Ruijie(config-line)#exec-character-bits 7
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-11

Command Reference

LINE Commands

2.15 flowcontrol
Use this command to configure the flow control mode for the async line. Use the no form of thiscommand to restore the default setting.
flowcontrol { hardware | none | software }no flowcontrol { hardware | none | software }Parameter
Description

Parameter

Description

hardwareConfigures hardware flow control.

none

Configures no flow control.

softwareConfigures software flow control.

Defaults

No flow control is configured by default.

CommandLINE configuration mode

Mode

Usage Guide

This command is used to control the data sending rate to make it consistent with the receiving rate at
the receiving end. The terminal cannot receive data while sending data, so this function prevent s
data drop. Flow control is also configured for the communication between high speed device and low
speed device (for example, printer and network interface). RGOS provides two flow control modes,
namely, software flow control and hardware flow control. The stop and start characters are Ctrl+S( XOFF, ASCII: 19) and Ctrl+Q (XON, ASCII: 17) respectively.

Configuration

The following example configures software flow control for the async line.

ExamplesRuijie(config)#line console 0

Ruijie(config-line)#flowcontrol software
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.16 history
Use this command to enable command history for the line or set the number of commands in thecommand history. Use the no history command to disable command history. Use the no history
size command to restore the number of commands in the command history to the default setting.
history [ size size ]no history

2-12

Command Reference

LINE Commands

no history size

Parameter
Description

Parameter

Description

size size

The number of commands, in the range from 0 to 256.

Defaults

This function is enabled by default, The default size is 10.

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets the number of commands in the command history to 20 for line VTY 0 5.

ExamplesRuijie(config)# line vty 0 5
Ruijie(config-line)# history size 20
The following example disables the command history for line VTY 0 5.
Ruijie(config)# line vty 0 5

Ruijie(config-line)# no history
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.17 ipv6 access-class
Use this command to configure access to the terminal through IPv6 ACL. Use the no form of thiscommand to restore the default setting.
ipv6 access-class access-list-name { in | out }no ipv6 access-class access-list-name { in | out }Parameter
Description

Parameter

Description

access-list-nameSpecifies the ACL name.

inFilters the incoming connections.

out

Filters the outgoing connections.

Defaults

N/A

CommandLine configuration mode

Mode

2-13

Command Reference

LINE Commands

Usage Guide

N/A

Configuration

The following example uses the ACL named “test” to filter the outgoing IPv6 connections in line VTY 0

Examples4.
Ruijie(config)# line vty 0 4

Ruijie(config-line)ipv6 access-list test out
RelatedCommands

Platform

Command

Description

show running

Displays status information

N/A

Description

2.18 length
Use this command to set the screen length for the line. Use the no form of this command to restore
the default setting.
length screen-length
no length

Parameter
Description

Parameter

Description

screen-length

Sets the screen length, in the range from 0 to 512.

Defaults

The default is 24.

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets the screen length to 10.

ExamplesRuijie(config-line)# length 10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-14

Command Reference

LINE Commands

2.19 line
Use this command to enter the specified LINE mode.
line [ console | vty ] first-line [ last-line ]Parameter
Description

Parameter

Description

consoleConsole portvty

Virtual terminal line, applicable for telnet/ssh connection.

first-line

Number of first-line to enter

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

Configuration

The following example enters the LINE mode from LINE VTY 1 to 3:

ExamplesRuijie(config)# line vty 1 3

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.20 line vty
Use this command to increase the number of VTY connections currently available. Use the no form of
this command to restore the default setting.
line vty line-number
no line vty line-number

Parameter
Description

Parameter

Description

line-number

VTY connection number, in the range from 0 to 35.

Defaults

Command

Global configuration mode.

Mode

2-15

Command Reference

LINE Commands

Usage Guide

Configuration

The following example increases the number of available VTY connections to 20. The available VTY

Examplesconnections are numbered 0 to 19.
Ruijie(config)# line vty 19
Decrease the number of available VTY connections to 10. The available VTY connections arenumbered 0-9.
Ruijie(config)# line vty 10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.21 location
Use this command to configure the line location description. Use the no form of this command torestore the default setting.
location location
no location

Parameter
Description

Parameter

Description

locationLine location description

Defaults

N/A

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example describes the line location as Swtich’s Line VTY 0.

ExamplesRuijie(config)# line vty 0

Ruijie(config-line)# location Swtich’s Line Vty 0
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

2-16

Command Reference

LINE Commands

Description

2.22 monitor
Use this command to enable log display on the terminal. Use the no form of this command to restore
the default setting,monitorno monitor

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example enables log display on the terminal in VTY line 0 5.

ExamplesRuijie(config)# line vty 0 5

Ruijie(config-line)# monitor
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.23 parity
Use this command to configure the parity for the async line. Use the no form of this command torestore the default setting.
parity { even | none | odd }no parity

Parameter
Description

Parameter

Description

even

Configures even parity,

none

Configures no parity.

odd

Configures odd parity,

2-17

Command Reference

LINE Commands

Defaults

No parity check is configured by default.

CommandLINE configuration mode

Mode

Usage Guide

Parity is required in communication through some devices (such as async serial ports and console
ports).

Configuration

The following example configures even parity for the async line.

ExamplesRuijie(config)#line console 0
Ruijie(config-line)#parity even

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.24 privilege level
Use this command to set the privilege level for the line. Use the no form of this command to restore
the default setting.
privilege level levelno privilege level

Parameter
Description

Parameter

Descriptionlevel

Privilege level, in the range from 0 to 15.

Defaults

The default is 1.

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets the privilege level for the line VTY 0 4 to 14.

ExamplesRuijie(config)# line vty 0 4
Ruijie(config-line)privilege level 14

RelatedCommands

Command

Description

2-18

Command Reference

LINE Commands

N/A

Platform

N/A

N/A

Description

2.25 refuse-message
Use this command to set the login refusal message for the line. Use the no form of this command torestore the default setting.
refuse-message [ c message c ]no refuse-message

Parameter
Description

Parameter

DescriptioncDelimiter of the login refusal message, which is not allowed within themessage.

message

Defaults

N/A

CommandLine configuration mode

Login refusal message.

Mode

Usage Guide

This command is used to set the login refusal message for the line. The characters entered after theending delimiter are discarded directly, The login refusal message is displayed when the user has
been refused to login.

Configuration

The following example sets the login refusal message for the line to “Unauthorized user cannot login

Examplesto the ruijie device”.
Ruijie(config-line)#refuse-message @ Unauthorized user cannot login to theruijie device @RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.26 show history
Use this command to display the command history of the line.
show history

2-19

Command Reference

Parameter
Description

LINE Commands

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the command history of the line.

ExamplesRuijie# show history
exec:
sh privilege
sh runshow user
sh user allshow history
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.27 show line
Use this command to display line configuration.
show line { console line-num | vty line-num | line-num }Parameter
Description

Parameter

Description

consoleDisplays configuration for the console line.

vty

Displays configuration for the virtual terminal line.

line-num

Displays the line.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

2-20

Command Reference

LINE Commands

Usage Guide

N/A

Configuration

The following example displays configuration for the console port.

ExamplesRuijie# show line console 0
CON

Type

speed

Overruns

* 0

CON

9600

45927

Line 0, Location: "", Type: "vt100"
Length: 24 lines, Width: 79 columns
Special Chars: Escape^^xTimeouts:

Disconnect Activation

none

Idle EXEC
never^M
Idle Session
neverHistory is enabled, history size is 10.
Total input: 53564 bytes
Total output: 395756 bytes
Data overflow: 27697 bytes
stop rx interrupt: 0 times
Field

Description

CON

Terminal type. CON indicates console; 0 indicates terminal line
number and * ahead of the number means that the terminal is in use.

Type

Terminal type, including CON, and VTY.

speed

Asynchronous speed.

Overruns

The number of overrun errors received by the flash.

Line 0Terminal line number.

Location: ""Line location configuration.

Type: "vt100"

Compatibility standard.

Special Chars

Special characters, including Escape, Disconnect, and Activation
characters.

Timeouts

Timeout value; “never” indicates no timeout.

History

Whether to enable command history; the number of commands in thecommand history.

RelatedCommands

Platform

Total input

Data volume received from the drive.

Total output

Date volume sent to the drive.

Data overflow

Overflowing data volume.

stop rx interrupt

Data reception interruption times.

Command

Description

N/A

N/A

N/A

Description

2-21

Command Reference

LINE Commands

2.28 show privilege
Use this command to display the privilege level of the line.
show privilege

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the privilege level of the line.

ExamplesRuijie# show privilege

Current privilege level is 10
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.29 show users
Use this command to display the login user information.
show users [ all ]Parameter
Description

Parameter

Description

all

Displays line user information, including users logging into the line
and users not logging into the line.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

2-22

Command Reference

LINE Commands

Configuration

The following example displays the information about users logging into the line,

ExamplesRuijie# show users
Line

User

Host(s)

Idle

Location---------------- ------------ -------------------- --------------------------0 con 0

---

idle

00:00:46---

1 vty 0---idle

00:00:29

20.1.1.2* 2 vty 1

---

idle

00:00:00

20.1.1.2

Idle

Location

The following example displays all line user information,
Ruijie(config)# show users all
Line

User

Host(s)---------------- ------------ -------------------- --------------------------0 con 0

---

idle

00:00:49---

1 vty 0---idle

00:00:32

20.1.1.2* 2 vty 1

---

idle

00:00:00

20.1.1.2

3 vty 2---00:00:00---

4 vty 3---00:00:00---

5 vty 4---00:00:00---

6 vty 5
RelatedCommands

Platform---

00:00:00

Command

Description

N/A

N/A

---

N/A

Description

2.30 speed
Use this command to configure the baud rate for the specified line. Use the no form of this command
to restore the default setting,speed baudrate
no speedParameter
Description

Parameter

Description

baudrate

Sets the baud rate, in the range from 9600 to 115200.

Defaults

The default is 9600.

CommandLINE configuration mode

Mode

2-23

Command Reference

LINE Commands

Usage Guide

N/A

Configuration

The following example sets the baud rate to 115200,

ExamplesRuijie(config-line)# speed 115200

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.31 start-character
Use this command toon the async line. Use the no form of this command to restore the default setting.
start-character ascii-value
no start-character

Parameter
Description

Parameter

Description

ascii-value

Sets the ASCII value corresponding to the start character for software
flow control on the async line, in the range from 0 to 255.

Defaults

The default is Ctrl+Q (ASCII: 17).

CommandLINE configuration mode

Mode

Usage Guide

The start character marks the start of the data transmission.

Configuration

The following example configures Ctrl+Y (ASCII: 25) for starting software flow control on the async

Examplesline,
Ruijie(config)#line console 0

Ruijie(config-line)#start-character 25
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-24

Command Reference

LINE Commands

2.32 stopbits
Use this command to configure the stopbit number for every character for the async line. Use the noform of this command to restore the default setting.
stopbits { 1 | 2 }no stopbits

Parameter
Description

Parameter

Description

1

Configures 1 stopbit.

2

Configures 2 stopbits.

Defaults

The default is 2.

CommandLINE configuration mode

Mode

Usage Guide

The stopbit is required in communication between the async line and the async device (such as theconventional numb terminals and modems).

Configuration

The following example sets the stopbit number of every character for the async line to 1.

ExamplesRuijie(config)#line console 0
Ruijie(config-line)#stopbits 1

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.33 stop-character
Use this command to configure the stop character for software flow control on the async line. Use theno form of this command to restore the default setting.
stop-character ascii-value
no stop-character

Parameter
Description

Parameter

Description

ascii-value

Sets the ASCII value corresponding to the stop character for software
flow control on the async line, in the range from 0 to 255.

2-25

Command Reference

LINE Commands

Defaults

The default is Ctrl+S (ASCII: 19).

CommandLINE configuration mode

Mode

Usage Guide

The stop character marks the end of the data transmission.

Configuration

The following example configures Ctrl+Z (ASCII: 26) for stopping software flow control on the async

Examplesline,
Ruijie(config)#line console 0

Ruijie(config-line)#stop-character 26
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.34 terminal databits
Use this command to configure the databit number of the character for the current terminal in flow
communication mode. Use the no form of this command to restore the default setting.
terminal databits bit
terminal no databits

Parameter
Description

Parameter

Description

bit

Configures the databit number of the character, in the range from 5 to
8.

Defaults

The default is 8.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example sets the databit number of every character for the current terminal in flow

Examplescommunication mode to 7.
Ruijie#terminal databits 7

RelatedCommands

Command

Description

2-26

Command Reference

LINE Commands

N/A

Platform

N/A

N/A

Description

2.35 terminal escape-character
Use this command to set the escape character for the current terminal. Use the no form of thiscommand to restore the default setting.
terminal escape-character escape-value
terminal no escape-character

Parameter
Description

Parameter

Description

escape-value

Sets the ASCII value corresponding to the escape character for thecurrent terminal, in the range from 0 to 255.

Defaults

The default escape character is Ctrl+^ (Ctrl+Shift+6) and the ASCII decimal value is 30.

CommandPrivileged EXEC mode

Mode

Usage Guide

After configuring this command, press the key combination of the escape character and then press x,
the current session is disconnected to return to the original session.

Configuration

The following example sets the escape character for the current terminal to 23 (Ctrl+w).

ExamplesRuijie# terminal escape-character 23

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.36 terminal exec-character-bits
Use this command to configure the coded character set for the current terminal. Use the no form of
this command to restore the default setting.
terminal exec-character-bits { 7 | 8 }terminal no exec-character-bits

Parameter

Parameter

Description

2-27

Command Reference

LINE Commands

Description
7

Configures a 7-bit coded character set.

8

Configures an 8-bit coded character set.

Defaults

The default is 8.

CommandPrivileged EXEC mode

Mode

Usage Guide

If you want to enter Chinese characters in the command line or display Chinese characters, graphs orother international characters, configure the exec-character-bits 8 command.

Configuration

The following example configures a 7-bit coded character set for the current terminal.

ExamplesRuijie#terminal exec-character-bits 7

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.37 terminal flowcontrol
Use this command to configure the flow control mode for the current terminal. Use the no form of thiscommand to restore the default setting.
terminal flowcontrol { hardware | none | software }terminal no flowcontrol { hardware | none | software }Parameter
Description

Parameter

Description

hardwareConfigures hardware flow control.

none

Configures no flow control.

softwareConfigures software flow control.

Defaults

No flow control is configured by default.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example configures software flow control for the current terminal.

2-28Command Reference

ExamplesRelatedCommands

Platform

LINE Commands

Ruijie#terminal flowcontrol software

Command

Description

N/A

N/A

N/A

Description

2.38 terminal history
Use this command to enable command history for the current terminal or set the number ofcommands in the command history. Use the no history command to disable command history. Use
the no history size command to restore the number of commands in the command history to thedefault setting.
terminal history [ size size ]terminal no history
terminal no history size

Parameter
Description

Parameter

Description

size size

Sets the number of commands, in the range from 0 to 256.

Defaults

This function is enabled by default, The default size is 10.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example sets the number of commands in the command history to 20 for the current

Examplesterminal.
Ruijie# terminal history size 20
The following example disables the command history for the current terminal.
Ruijie# terminal no history

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-29

Command Reference

LINE Commands

2.39 terminal length
Use this command to set the screen length for the current terminal. Use the no form of this command
to restore the default setting.
terminal length screen-lengthterminal no length

Parameter
Description

Parameter

Description

screen-length

Sets the screen length, in the range from 0 to 512.

Defaults

The default is 24.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example sets the screen length for the current terminal to 10.

ExamplesRuijie# terminal length 10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.40 terminal location
Use this command to configure location description for the current device. Use the no form of thiscommand to restore the default setting.
terminal location location
terminal no location

Parameter
Description

Parameter

Description

location

Configures location description of the current device.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

2-30

Command Reference

LINE Commands

Usage Guide

N/A

Configuration

The following example configures location description of the current device as “Swtich’s Line Vty 0”.

ExamplesRuijie# terminal location Swtich’s Line Vty 0

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.41 terminal parity
Use this command to configure the parity for the current terminal. Use the no form of this command torestore the default setting.
terminal parity { even | none | odd }terminal no parity

Parameter
Description

Parameter

Description

even

Configures even parity,

none

Configures no parity.

odd

Configures odd parity,

Defaults

No parity check is configured by default.

CommandPrivileged EXEC mode

Mode

Usage Guide

Parity is required in communication through some devices (such as async serial ports and console
ports).

Configuration

The following example configures even parity for the current terminal.

ExamplesRuijie#terminal parity even

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-31

Command Reference

LINE Commands

2.42 terminal speed
Use this command to configure the baud rate for the current terminal. Use the no form of thiscommand to restore the default setting,terminal speed baudrateterminal no speed

Parameter
Description

Parameter

Description

baudrate

Sets the baud rate, in the range from 9600 to 115200.

Defaults

The default is 9600.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example sets the baud rate for the current terminal to 115200,

ExamplesRuijie# terminal speed 115200

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.43 terminal start-character
Use this command to configure the start character for software flow control on the current terminal.
Use the no form of this command to restore the default setting.
terminal start-character ascii-value
terminal no start-character

Parameter
Description

Parameter

Description

ascii-value

Sets the ASCII value corresponding to the start character for software
flow control on the current terminal, in the range from 0 to 255.

Defaults

The default is Ctrl+Q (ASCII: 17).

CommandPrivileged EXEC mode

2-32

Command Reference

LINE Commands

Mode

Usage Guide

N/A

Configuration

The following example configures Ctrl+Y (ASCII: 25) for starting software flow control on the current

Examplesdevice,Ruijie#terminal start-character 25

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.44 terminal stopbits
Use this command to set the stopbit number of every character for the current terminal. Use the noform of this command to restore the default setting.
terminal stopbits { 1 | 2 }terminal no stopbits

Parameter
Description

Parameter

Description

1

Configures 1 stopbit,

2

Configures 2 stopbits.

Defaults

The default is 2.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example configures 1 stopbit for the current terminal.

ExamplesRuijie#terminal stopbits 1

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-33

Command Reference

LINE Commands

2.45 terminal stop-character
Use this command to configure the stop character for software flow control on the current terminal.
Use the no form of this command to restore the default setting.
terminal stop-character ascii-value
terminal no stop-character

Parameter
Description

Parameter

Description

ascii-value

Sets the ASCII value corresponding to the stop character for software
flow control on the current terminal, in the range from 0 to 255.

Defaults

The default is Ctrl+S (ASCII: 19).

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example configures Ctrl+Z (ASCII: 26) for stopping software flow control on the current

Examplesdevice.
Ruijie#terminal stop-character 26

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.46 terminal terminal-type
Use this command to configure the simulated terminal type string for the current terminal. Use the noform of this command to restore the default setting.
terminal terminal-type terminal-type-string
terminal no terminal-type

Parameter
Description

Defaults

Parameter

Description

terminal-type-string

Sets the terminal type string, such as vt100 and ansi.

The default is vt100.

2-34

Command Reference

CommandLINE Commands

Privileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example sets the simulated terminal type string for the current terminal to ansi.

ExamplesRuijie#terminal terminal-type ansi

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.47 terminal width
Use this command to set the screen width for the terminal.
terminal width screen-width
terminal no widthParameter
Description

Parameter

Description

screen-width

Sets the screen width for the terminal, in the range from 0 to 256.

Defaults

The default is 79.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example sets the screen width for the terminal to 10.

ExamplesRuijie# terminal width 10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-35

Command Reference

LINE Commands

2.48 terminal-type
Use this command to configure the simulated terminal type string of the async line.
terminal-type terminal-type-string
no terminal-type

Parameter
Description

Parameter

Description

terminal-type-string

Configures the terminal type string, such as vt100 and ansi.

Defaults

The default is vt100.

CommandLINE configuration mode

Mode

Usage Guide

You can use the terminal-type vt100 command to restore the default terminal type. If you want toenable telnet connection, you should use the simulated terminal type to perform terminal typenegotiation (Telnet: 0x18). See RFC 854 for details.

Configuration

The following example sets the simulated terminal type of the async line to ansi.

ExamplesRuijie(config)#line console 0

Ruijie(config-line)#terminal-type ansi
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.49 timeout login
Use this command to set the login authentication timeout for the line. Use the no form of thiscommand to restore the default setting.
timeout login response seconds
no timeout login response

Parameter
Description

Parameter

Description

response

The time period during which the line waits for the user to enter any
message.

seconds

Timeout value, in the range from 1 to 300 in the unit of seconds.

2-36

Command Reference

Defaults

The default is 30.

CommandLine configuration mode

LINE Commands

Mode

Usage Guide

N/A

Configuration

The following example sets the login authentication timeout to 300 seconds for line VTY 0 5.

ExamplesRuijie(config)# line vty 0 5

Ruijie(config-line) timeout login response 300
RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.50 transport input
Use this command to set the specified protocol under Line that can be used for communication. Use
the no form of this command to restore the default setting.
transport input { all | ssh | telnet | none }no transport input { all | ssh | telnet | none }Parameter
Description

Parameter

Description

all

Allows all the protocols under Line to be used for communicationsshtelnetnone

Allows only the SSH protocol under Line to be used forcommunication
Allows only the Telnet protocol under Line to be used forcommunication
Allows none of protocols under Line to be used for communication

Defaults

all, ssh and telnet protocols are allowed.

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example specifies that only the Telnet protocol is allowed to login in line vty 0 4.

ExamplesRuijie(config)# line vty 0 5
Ruijie(config-line)transport input ssh

2-37

Command Reference

RelatedCommands

LINE Commands

Command

Description

show running

Displays status information

N/A

Platform
Description

2.51 vacant-message
Use this command to set the logout message. Use the no form of this command to restore the default
setting.
vacant-message [ c message c ]no vacant-message

Parameter
Description

Parameter

DescriptioncDelimiter of the logout message, which is not allowed within themessage.

message

Defaults

N/A

CommandLine configuration mode

Logout message.

Mode

Usage Guide

This command is used to set the logout message for the line. The characters entered after the ending
delimiter are discarded directly, The logout message is displayed when the user logs out.

Configuration

The following example sets the logout message to “Logout from the ruijie device”.

ExamplesRuijie(config-line)#vacant-message @ Logout from the ruijie device @RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2.52 width
Use this command to set the screen width for the line. Use the no form of this command to restore thedefault setting,

2-38

Command Reference

LINE Commands

width screen-width
no widthParameter
Description

Parameter

Description

screen-width

Sets the screen width for the line, in the range from 0 to 256,

Defaults

The default is 79.

CommandLine configuration mode

Mode

Usage Guide

N/A

Configuration

The following example sets the screen width for the line to 10.

ExamplesRuijie(config-line)# width 10

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

2-39

Command ReferenceFile System Commands

3 File System Commands
3.1 cdUse this command to set the present directory for the file system.
cd [ filesystem: ] [ directory ]Parameter

Parameter

Description

Description

filesystem:

The URL of filesystem, followed by a colon (:). The filesystem
includes flash:, tmp:.

directory

The path name. A file name starts with “/” is an absolute path.
Otherwise, it is a relative path.

Defaults

The default directory is the flash root directory.

CommandPrivileged EXEC mode.

Mode
Usage Guide

Configuration
ExamplesRelatedCommand

Description

Commands

pwd

Displays the present word directory.

Platform

N/A.

Description

3.2 copy
Use this command to copy a file from the specified source directory to the specified destination
directory.
copy source-url destination-url

Parameter

Parameter

Description

Description

source-url

Source file URL, which can be local or remote.

destination-url

Destination file URL, which can be local or remote.

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

3-1

Command Reference

Usage Guide

File System Commands

when the file to be copied exists on the target URL, the target file system determines the action, suchas error report, overwrite, or offering you the choice.
The following table lists the URL:
PrefixDescription

running-config

Running configuration file.

startup-config

startup configuration file.

flash:

local FLASH file system.

tftp:

The URL of TFTP network server, in the format as follows:
tftp:[[//location]/directory]/filename

Configuration

The following example copies the netconfig file from device 192.168.64.2 to the FLASH disk and the

Examples

netconfile file exists locally.
Ruijie#copy tftp://192.168.64.2/netconfig flash:/netconfig
The file [flash:/netconfig] exits,override it? [Y/N]: y
Copying: !!!!!!!!
Accessing tftp://192.168.64.2/netconfig finished, 2399bytes prepared
Flushing data to flash:/netconfig…
Flush data done

RelatedCommand

Description

Commands

deleteDeletes the file.

renameRenames the file.

dirDisplays the file list of the specified directory.

Platform

N/A

Description

3.3 delete
Use this command to delete the files in the present directory.
delete [ filesystem: ] file-url

Parameter
Description

Parameter
filesystem:

file-url

Defaults

Description
The URL of file system, followed by a colon (:). The file system
includes flash:, tmp:.
The file name containing the path. A file name starts with “/” is anabsolute path. Otherwise, it is a relative path.

The default filesystem: is flash:.

3-2

Command Reference

CommandFile System Commands

Privileged EXEC mode.

Mode

Usage Guide

Configuration

The following example deletes the fstab file on the FLASH disk.

ExamplesRuijie#pwd
flash:/
Ruijie#dir
Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 fstab

2

-rw-

4096

Jan 03 2012 12:32:09 rc.d

3

-rw-

10485760

Jan 03 2012 18:13:37 rpmdb

3 files, 0 directories
10,490,192 bytes total (13,192,656 bytes free)
Ruijie#delete flash:/fstab
Ruijie#dir
Directory of flash:/
1

-rw-

4096

2

-rw-

10485760

Jan 03 2012 12:32:09 rc.d
Jan 03 2012 18:13:37 rpmdb

2 files, 0 directories
10,489,856 bytes total (13,192,992 bytes free)

The following example deletes the non-null file on the FLASH disk recursively.
Ruijie#pwd
flash:/
Ruijie#dir
Directory of flash:/
1 drwx0

2 -rw-

610019Thu Jan 1 02:02:25 1970 file
Tue Aug 14 02:21:13 2012 file-5.11.tar.gz

1 file, 1 directory
58,720,256 bytes total (28,577,792 bytes free)
Ruijie#delete /recursive flash:/file
Ruijie#dir
Directory of flash:/
1 -rw-

610019Tue Aug 14 02:21:13 2012 file-5.11.tar.gz

1 file, 0 directories
58,720,256 bytes total (31,358,976 bytes free)

RelatedCommand

Description

Commands

copy

Copies the file.

dirDisplays the file list of the specified directory.

Platform

N/A

3-3

Command ReferenceFile System Commands

Description

3.4 dir
Use this command to display the files in the present directory.
dir [ filesystem: ] [ directory ]Parameter

Parameter

Description

Description

filesystem

The URL of file system, followed by a colon (:). The file system includes flash:,tmp:.

directory

The path name. A file name starts with “/” is an absolute path. Otherwise, it is arelative path.

Defaults

By default, only the information under the present working path is displayed.

CommandPrivileged EXEC mode.

Mode

Usage Guide

Configuration

The following example displays the file information of the root directory in the FLASH disk.

ExamplesRuijie#dir flash:/Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 fstab

2

-rw-

4096

Jan 03 2012 12:32:09 rc.d

3

-rw-

10485760

Jan 03 2012 18:13:37 rpmdb

3 files, 0 directories
10,490,192 bytes total (13,192,656 bytes free)
Field

Description

1, 2, 3…

Index number
Permissions on a file include:-rw-

Relatedd: directory

r: read

w: writex: executable

10485760

File size

rpmdb

File namefiles

File number

directories

Directory number

total

Total size

free

Available space

Command

Description

3-4Command Reference

Commands

Platform

File System Commands

pwd

Displays the present directory.

cd

Sets the present directory of the file system.

N/A.

Description

3.5 mkdir
Use this command to create a directory.
mkdir [ filesystem: ] directory

Parameter

Parameter

Description

Description

filesystem:

The URL of file system, followed by a colon (:). The file system
includes flash:, tmp:.
The path name. A file name starts with “/” is an absolute path.

directory

Otherwise, it is a relative path.

Defaults

The default filesystem: is flash:.
The default directory is the root directory.

CommandPrivileged EXEC mode.

Mode

Usage Guide

Configuration

The following example creates a directory named newdir:

ExamplesRuijie#dir
Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 fstab

2

-rw-

4096

Jan 03 2012 12:32:09 rc.d

3

-rw-

10485760

Jan 03 2012 18:13:37 rpmdb

3 files, 0 directories
10,490,132 bytes total (13,192,656 bytes free)
Ruijie#mkdir newdir
Created dir flash:/newdir
Ruijie#dir
Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 fstab

2

-rw-

4096

Jan 03 2012 12:32:09 rc.d

3

-rw-

10485760

Jan 03 2012 18:13:37 rpmdb

4

drw-

4096

Jan 03 2012 18:13:37 newdir

3 files, 1 directories
10,494,228 bytes total (13,188,560 bytes free)

3-5

Command ReferenceFile System Commands

RelatedCommand

Description

Commands

rmdir

Deletes the directory.

pwd

Displays the present directory.

Platform

N/A

Description

3.6 more
Use this command to display the content of a file.
more [ /ascii | /binary ] [ filesystem: ] file-url

Parameter

Parameter

Description

Description/ascii

Displays the file content in the ASCII format.

/binary

Displays the file content in the
The URL of file system, followed by a colon (:). The file systemfilesystem:

includes flash:, tmp:.
The file name containing the path. A file name starts with “/” is an

file-url

absolute path. Otherwise, it is a relative path.

Defaults

The file is displayed in its own format by default.

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the content of the netconfig file under root directory of FLASH disk.

ExamplesRuijie#more flash:/netconfig## The network configuration file. This file is currently only used in# conjunction with the TI-RPC code in the libtirpc library.
## Entries consist of:###<network_id> <semantics> <flags> <protofamily> <protoname> \<device> <nametoaddr_libs>## The <device> and <nametoaddr_libs> fields are always empty in this# implementation.
#
udp

tpi_clts

v

inet

udp

-

-

tcp

tpi_cots_ord

v

inet

tcp

-

-

udp6

tpi_clts

v

inet6

udp

-

-

3-6

Command ReferenceFile System Commands

tcp6

tpi_cots_ord

v

inet6

tcp

rawip

tpi_raw

-

inet

-

local

tpi_cots_ord-

loopback

-

-

-

-

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A-

Description

3.7 pwd
Use this command to display the working path.
pwd

Parameter

Parameter

Description

Description

N/A.

N/A.

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

N/A

ExamplesRelatedCommand

Description

Commands

cd

Changes the file system in the present directory.

Platform

N/A.

Description

3.8 rename
Use this command to move or rename the specified file.

rename src-url dst-url
Parameter

Parameter

Description

Description

src-url

The source file URL to move.

dst-url

The URL of the destination file or directory.

3-7

Command ReferenceFile System Commands

Defaults

N/A.

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example renames the fstab file in the root directory on the FLASH disk as new-fstab.

ExamplesRuijie#dir
Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 fstab

2

-rw-

4096

Jan 03 2012 12:32:09 rc.d

3

-rw-

10485760

Jan 03 2012 18:13:37 rpmdb

3 files, 0 directories
10,490,192 bytes total (13,192,656 bytes free)
Ruijie#rename flash:/fstab flash:/new-fstab
Renamed file flash:/new-fstab
Ruijie#dir
Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 new-fstab

2

-rw-

4096

Jan 03 2012 12:32:09 rc.d

3

-rw-

10485760

Jan 03 2012 18:13:37 rpmdb

3 files, 0 directories
10,490,192 bytes total (13,192,656 bytes free)

RelatedCommand

Description

Commands

deleteDeletes the file.

copy

Copies the file.

Platform

N/A

Description

3.9 rmdir
Use this command to delete an empty directory.
rmdir [ filesystem: ] directory

Parameter
Description

Parameter
filesystem:

directory

Defaults

Description
The URL of file system, followed by a colon (:). The file system
includes flash:, tmp:.
The path name. A file name starts with “/” is an absolute path.
Otherwise, it is a relative path.

The default filesystem: is flash:.

3-8Command Reference

CommandFile System Commands

Privileged EXEC mode.

Mode

Usage Guide

This command does not support the wildcards, and the directory to be deleted must be empty. Since
this command supports abbreviations, you can also use the rm command to delete empty directories.

Configuration

The following example deletes the null test directories.

ExamplesRuijie#mkdir newdir
Ruijie#dir
Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 fstab

2
3

-rw-

4096

Jan 03 2012 12:32:09 rc.d

-rw-10485760

Jan 03 2012 18:13:37 rpmdb

4

drw-

4096

Jan 03 2012 18:13:37 newdir

3 files, 1 directories
10,494,228 bytes total (13,188,560 bytes free)
Ruijie#rmdir newdir
removed dir flash:/newdir
Ruijie#dir
Directory of flash:/
1

-rw-

336

Jan 03 2012 18:53:42 fstab

2
3

-rw-

4096

Jan 03 2012 12:32:09 rc.d

-rw-10485760

Jan 03 2012 18:13:37 rpmdb

3 files, 0 directories
10,490,132 bytes total (13,192,656 bytes free)

RelatedCommand

Description

Commands

N/A.

N/A.

Platform

N/A.

Description

3.10 show file systems
Use this command to display the file system information.
show file systems

Parameter

Parameter

Description

Description

N/A.

N/A.

Defaults

N/A.

CommandUser EXEC mode/Privileged EXEC mode/Global configuration mode/Interface EXEC mode

3-9

Command ReferenceFile System Commands

Mode

Usage Guide

Use this command to display the file systems supported in the present devices and the available
space condition in the file system.

Configuration

The following example displays the file system information:

ExamplesRuijie#show file systems
Size(KB)

Free(KB)

Type

Flags Prefixes

NA

NA

ram

rw tmp:NA

NA

network

8192

2416

disk

rw tftp:rw flash:

Field

Description

Size(KB)

File system space, in the unit of KB.

Free(KB)

Available file system space, in the unit of KB.

TypeFile system type
Permissions on the file system include:

Flags

Prefixesro: read-only

wo: write-only

rw: read and write

File system prefix

RelatedCommand

Description

Commands

N/A.

N/A.

Platform

N/A.

Description

3.11 show mount
Use this command to display the mounted information.
show mountParameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandUser EXEC mode/Privileged EXEC mode/Global configuration mode/Interface EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the mounted information.

3-10

Command Reference

ExamplesFile System Commands

Ruijie#show mount/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)none on /sys/kernel/debug type debugfs (rw)none on /sys/kernel/security type securityfs (rw)udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)/dev/sda3 on /hao-share type ext3 (rw,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc(rw,noexec,nosuid,nodev)
Field

Description

proc

Source address of mount.

on

-

/proc

Destination address of mount.

type

-

proc

Mount type.

(rw,noexec,nosuid,nodev)

Mount property.

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.12 tftp-client source
Use this command to bind a source IP address or source interface with a TFTP client. Use the no or
default form of this command to restore the default setting.
tftp-client source { ip ip-address | ipv6 ipv6-address | interface }no tftp-client source { ip ip-address | ipv6 ipv6-address | interface}default tftp-client source { ip ip-address | ipv6 ipv6-address | interface }Parameter

Parameter

Description

Description

ip-address

Specifies the IPv4 source address.

Ipv6-address

Specifies the IPv6 source address.

interface

Specifies the source interface

Defaults

No source interface or IP address is bound with the TFTP client by default.

3-11Command Reference

CommandFile System Commands

Global configuration mode

Mode

Usage Guide

N/A

Configuration

The following example binds source IP address 192.168.23.236 with the TFTP client.

ExamplesRuijie(config)# tftp-client source ip 192.168.23.236
The following example binds source IPv6 address 2003:0:0:0::2 with the TFTP client.
Ruijie(config)# tftp-client source ipv6 2003:0:0:0::2
The following example binds source interface gigabitEthernet 0/17 with the TFTP client.
Ruijie(config)# tftp-client source gigabitEthernet 0/17
The following example removes the configuration.
Ruijie(config)# no tftp-client source ip 192.168.23.236
The following example restores the default setting.
Ruijie(config)# default tftp-client source ip 192.168.23.236

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3.13 tree
Use this command to display the file tree of the current directory.
tree [ filesystem: ] [ directory ]Parameter
Description

Parameter
filesystem:

directory

Description
The URL of file system, followed by a colon (:). The file system
includes flash:, tmp:.
The path name. A file name starts with “/” is an absolute path.
Otherwise, it is a relative path.

Defaults

The default filesystem: is flash:.

CommandUser EXEC mode/Privileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the file tree of flash:/echo

ExamplesRuijie#tree flash:/echo+-- client_module

3-12Command ReferenceFile System Commands+-- client_userspace+-- echo_cli.c+-- echo_client.c+-- echo_client.h+-- echo_client.o+-- echo_cli.o+-- echo_flag.h+-- echo.h+-- echo.ko+-- echo_server.h+-- exec_set_echo.h+-- exec_show_echo.h+-- Makefile+-- module¦+-- echo.ko¦+-- echo.mod.c¦+-- echo.mod.o¦+-- echo_module.c¦+-- echo_module.o¦+-- echo.o¦+-- echo_server.c¦+-- echo_server.o¦+-- echo_sysfs.c¦+-- echo_sysfs.h¦+-- echo_sysfs.o¦+-- Makefile¦+-- modules.order¦+-- Module.symvers¦+-- msg_fd.c¦+-- msg_fd.o+-- readme+-- server_module+-- server_userspace+-- sys_rgos.ko+-- user_space+-- echo_server.c+-- echo_server.o+-- Makefile+-- msg_fd.c+-- msg_fd.o 10,490,132 bytes total (13,192,656 bytes free)

RelatedCommand

Description

Commands

N/A

N/A

3-13

Command Reference

Platform

File System Commands

N/A

Description

3.14 verify
Use this command to compute, display and verify Message Digest 5 (MD5).
verify [ /md5 md5-value ] filesystem: [ file-url ]Parameter

Parameter

Description

Description/md5

Computes and displays MD5.

md5-value

The file MD5, which is compared with the computed MD5.

filesystem:

file-url

The URL of file system, followed by a colon (:). The file system
includes flash:, tmp:.
The file name containing the path. A file name starts with “/” is anabsolute path. Otherwise, it is a relative path.

Defaults

The default filesystem: is flash:.

CommandPrivileged EXEC mode.

Mode

Usage Guide

N/A

Configuration

The following example computes MD5 of flash:/gcc.

ExamplesRuijie#verify flash:/gcc
8b072de7db7affd8b2ef824e7e4d716c
The following example computes MD5 of flash:/gcc and makes a comparison.
Ruijie#verify /md5 8b072de7db7affd8b2ef824e7e4d716c flash:/gcc%SUCCESS verifying /mnt/flash/gcc = 8b072de7db7affd8b2ef824e7e4d716c
Ruijie#verify /md5 8b072de7db7affd8b2ef824e7e4d71 flash:/gcc%Error verifying flash:/gcc
Computed signature = 8b072de7db7affd8b2ef824e7e4d716c
Submitted signature = 8b072de7db7affd8b2ef824e7e4d71

RelatedCommand

Description

Commands

N/A

N/A

Platform

N/A

Description

3-14

Command Reference

SYS Commands

4 SYS Commands
4.1 calendar set
Use this command to set the hardware calendar.
calendar set { hour [ :minute [ :second ] ] } [ month [ day [ year ] ] ]Parameter
Description

Parameter

Description

hour [ :minute [ :second ] ]Sets hardware time in the format of hour: minute: second. Only the
specified parameters (hour, minute, or second) can be reset. The
unspecified parameters keep the current system values.

month

Sets month. The range is from 1 to 12.

day

Sets date. The range is from 1 to 31. If the day does not exist in the current
month, the date is calculated backward.

year

Sets year. The range is from 1970 to 2069.

Defaults-

CommandPrivileged EXEC mode

Mode

Default Level-

Usage Guide

1.

The time parameter is mandatory. After setting time, set month, day, and year, which can beneglected according to your needs. The parameter that is neglected keeps the current system value.
For example, if the current hardware time is "2012-02-29 09:33:44" and you want to change monthand hour and keep values of other parameters, use the calendar set 12 5 command to change thecurrent time into "2012-05-29 12:33:44".

2.

If the value of parameter day is between 1 and 31, but the current month does not contain that day,the value will be calculated backward. For example, February 2012 has 29 days. If you use thecalendar set 11:30 2 31 2012 command to set the date to February 31, by default, the system adds
two days backwards. Therefore, the current hardware time is "2012-03-02 11:30:23".
The hardware time of the system is used as the UTC time, while the software time of the systemrefers to the local time of the device.

Configuration

The following example changes the current hardware time of the system (for example, 2012-02-01

Examples

18:23:06) into 6 o’clock and keeps the values of other parameters.
Ruijie# calendar set 6
06:41:39 UTC Fri, Jul 6, 2012

The following example changes the current hardware time of the system (for example, 2012-02-01

4-1

Command Reference

SYS Commands

18:23:06) into 06:42 and keeps the values of other parameters.
Ruijie# calendar set 6:42
06:42:27 UTC Fri, Jul 6, 2012

The following example changes the current hardware time of the system (for example, 2012-02-01
18:23:06) into March 2 and keeps the values of other parameters.
Ruijie# calendar set 18 3 2
18:43:05 UTC Fri, Mar 2, 2012
Because the hour parameter is mandatory, set it to the current time if you do not need to change its
value. As shown in the last example, enter 18 (hour), and then enter 3 (month) and 2 (day).

Check Method

Platform
Description--

4.2 clock read-calendar
Use this command to enable the system to synchronize the software time with the hardware time.
clock read-calendar

Parameter
Description

Parameter

Description--

Defaults-

CommandPrivileged EXEC mode

Mode

Default Level-

Usage Guide

After you configure this command, the system will synchronize the software time with the current hardware
time according to the time zone and summer time settings of the device.

Configuration

The following example enables the system to synchronize the software time with the hardware time.

ExamplesRuijie# clock read-calendar
Set the system clock from the hardware time.

Check Method

Platform
Description

-

-

4-2

Command Reference

SYS Commands

4.3 clock set
Use this command to set the system software clock.
clock set { hour [ :minute [ :second ] ] } [ month [ day [ year ] ] ]Parameter
Description

Parameter

Description

hour [ :minute [ :second ] ]Sets software time in the format of hour: minute: second. Only the specified
parameters (hour, minute, or second) can reset. The unspecified
parameters keep the current system values.

month

Sets month. The range is from 1 to 12.

day

Sets date. The range is from 1 to 31. If the day does not exist in the current
month, the date is calculated backward.

year

Sets year. The range is from 1970 to 2069.

Defaults-

CommandPrivileged EXEC mode

Mode

Default Level-

Usage Guide

1.

The time parameter is mandatory. After setting time, set month, day, and year, which can beneglected according to your needs. The parameter that is neglected keeps the current system value.
For example, if the current hardware time is "2012-02-29 09:33:44" and you want to change monthand hour and keep values of other parameters, use the clock set 12 5 command to change thecurrent time into "2012-05-29 12:33:44".

2.

If the value of parameter day is between 1 and 31, but the current month does not contain that day,the value will be calculated backward.
For example, February 2012 has 29 days. If you use the clock set 11:30 2 31 2012 command to set
the date to February 31, by default, the system adds two days backward. Therefore, the current
hardware time is "2012-03-02 11:30:23".

Configuration

The following example changes the current software time of the system (for example, 2012-02-01

Examples

18:23:06) into 6 o’clock and keeps the values of other parameters.
Ruijie# clock set 6
06:48:13 CST Fri, Mar 2, 2012

The following example changes the current software time of the system (for example, 2012-02-01
18:23:06) into 06:42 and keeps the values of other parameters.
Ruijie# clock set 6:42
06:42:31 CST Fri, Mar 2, 2012

4-3

Command Reference

SYS Commands

The following example changes the current software time of the system (for example, 2012-02-01
18:23:06) into March 2 and keeps the values of other parameters.
Ruijie# clock set 18 3 2
18:42:48 CST Fri, Mar 2, 2012
Because the hour parameter in this command is mandatory, set it to the current time if you do notneed to change its value. As shown in the last example, enter 18 (hour), and then enter 3 (month)and 2 (day).

Check Method

Platform
Description--

4.4 clock summer-time
Use this command to set the summer time.
clock summer-time zone start start-month [week|last] start-date hh:mm end end-month [week| last]end-date hh:mm [ ahead hours-offset [minutes-offset ]Use this command to disable the summer time.
no clock summer-time

4-4Command Reference

Parameter
Description

SYS Commands

Parameter

Description

zone

Summer time name. It can only be a letter between A and Z or between aand z, which is not case sensitive. The summer time name contains 3 to 31
characters.

start

Indicates the start time of the summer time.

start-month

Start month. Value range: January, February, March, April, May, June,
July, August, September, October, November, and December. The value is
not case sensitive and you are allowed to enter an incomplete word, forexample, Febr and FebRu.

week

Start week in the start month. The

range is from 1 to 5.

last

The last week of the specified month.

start-date

Day in the start week of the start month. Value range: Sunday, Monday,
Tuesday, Wednesday, Thursday, Friday, and Saturday. The value is notcase sensitive and you are allowed to enter an incomplete word, forexample, Web and WeDne.

hh:mmTime, in the format of hour : minute.

end

Indicates the end time of the summer time.

end-month

End month. Value range: January, February, March, April, May, June, July,
August, September, October, November, and December. The value is notcase sensitive and you may enter an incomplete word, for example, Febrand FebRu.

ahead

Indicates how much time for the summer time ahead of the standard time
during the effective period of the summer time. By default, the summer timeis one hour ahead of the standard time.

hours-offset

Hours ahead of the standard time. The range is from 0 to 12. You are notallowed to set it to 00:00.

minutes-offset

Minutes ahead of the standard time. The range is from 0 to 59. Ifhours-offset has been set to 0, you are not allowed to set minutes-offset to0.

Defaults-

Command

Global configuration mode

Mode

Default Level-

Usage Guide

Configuration

Assume that the time zone name of your living place is ABC and the standard time is 8:15 ahead of UTC,

Examplesnamely, GMT+08:15. The summer time period starts from the first Saturday in February to the third
Monday in May and the summer time is 01:20 ahead of the standard time. In this case, the summer time is

4-5

Command Reference

SYS Commands

09:35 ahead of the UTC time, but non-summer time is still 08:15 ahead of the UTC time.
Ruijie(config)# clock timezone ABC 8 15
Set time zone name: ABC (GMT+08:15)
Ruijie(config)#show clock
16:39:16 ABC Wed, Feb 29, 2012
Ruijie(config)#show calendar
08:24:35 GMT Wed, Feb 29, 2012
Ruijie(config)# clock summer-time TZA start Feb 1 sat 2:00 end May 3 Monday 18:30 ahead 1 20
*May 10 03:45:58: %SYS-5-CLOCKUPDATE: Set summer-time: TZA from February the 1st Saturday at 2:00
TO May the 3rd Monday at 18:30, ahead 1 hour 20 minuteSet summer-time: TZA from February the 1st Saturday at 2:00 TO May the 3rd Monday at 18:30, ahead
1 hour 20 minuteRuijie# show clock
18:00:08 TZA Wed, Feb 29, 2012

# If the time is set to non-summer time, the time zone name is restored to ABC.
Ruijie#clo set 18 1 1*Jan

1 18:00:09: %SYS-5-CLOCKUPDATE: Set system clock: 18:00:09 ABC Sun, Jan 1, 2012

Set system clock: 18:00:09 ABC Sun, Jan

1, 2012

Ruijie#show clock
18:00:12 ABC Sun, Jan 1, 2012

If the system uses the default summer time that is one hour ahead of the standard time, ahead and theparameters behind ahead can be neglected. For example, set the summer time to start from 2:00 a.m. of
the first Sunday in April to 2:00 a.m. of the last Sunday in October and set the summer time to one hourahead of the standard time.
Ruijie(config)#clo summer-time PDT start April 1 sunday 2:00 end October last Sunday 2:00
*May 10 03:15:05: %SYS-5-CLOCKUPDATE: Set summer-time: PDT from April the 1st Sunday at 2:00 TO
October the last Sunday at 2:00, ahead 1 hour
Set summer-time: PDT from April the 1st Sunday at 2:00 TO October the last Sunday at 2:00, ahead
1 hour

The following example disables summer time.
Ruijie(config)#no clock summer-time*Jan

1 18:01:09: %SYS-5-CLOCKUPDATE: Set no summer time.

Set no summer time.
Check Method

Platform
Description

-

-

4-6

Command Reference

SYS Commands

4.5 clock timezone
Use this command to set the time zone.
clock timezone [ name hours-offset [ minutes-offset ] ]Use this command to remove the time zone settings.
no clock timezone

Parameter
Description

Parameter

Description

nameTime zone name. It can only be a letter between A and Z or between a andz, which is not case sensitive. The name contains 3 to 31 characters.

hours-offset

Hours of time difference. It indicates whether the time is faster or smaller
than the hardware UTC time. The range is from -12 to 12. The negative
digit indicates that the time is slower than the hardware time, while thepositive digit indicates that the time is faster than the hardware time.
If the time is slower than the UTC time, add "-" before hours-offset.

minutes-offset

Defaults-

Command

Global configuration mode

Minutes of time difference. The range is from 0 to 59.

ModeDefault Level-

Usage Guide

Configuration

The following example sets the time zone name to CST. The software time is 8 hours faster than the

Exampleshardware time.
Ruijie(config)# clock timezone CST 8
Set time zone name: CST (GMT+08:00)
Ruijie# show clock
18:00:17 CST Wed, Dec 5, 2012

The following example sets the time zone name TZA. The software time is 06:13 slower than the hardware
time.
Ruijie(config)# clock timezone TZA -6 13
Set time zone name: TZA (GMT-06:13)

The following example removes the time zone settings.
Ruijie(config)# no clock timezone
Set no clock timezone.

4-7Command Reference

Check Method

Platform
Description

SYS Commands--

4.6 clock update-calendar
Use this command to enable the system to synchronize the hardware time with the software time.
clock update-calendar

Parameter
Description

Parameter

Description--

Defaults-

CommandPrivileged EXEC mode

Mode

Default Level-

Usage Guide

After you configure this command, the system will synchronize the hardware time with the current software
time according to the time zone and summer time settings of the device.

Configuration

The following example enables the system to synchronize the hardware time with the software time.

ExamplesRuijie# clock update-calendar
Set the hardware time from the system clock.
The following example sets the time zone of the hardware time to GMT+5:10, which indicates that the
hardware time is 5:10 slower than the software time. The summer time is not set.
Ruijie# show clock
09:30:21 TSZ Wed, Feb 29, 2012
Ruijie# clock update-calendar
Set the hardware time from the system clock.
Ruijie#show calendar
04:20:25 UTC Wed, Feb 29, 2012

The following example sets the hardware time. If it is set to GMT+5:10 and the summer time is set to be
1:15 faster from the first Monday in February 1 to the second Sunday in June 1, it indicates that the
hardware time is 6:25 slower than the software time during the effective period of the summer time.
Ruijie# show clock
09:30:02 TSZ Wed, Feb 29, 2012

4-8

Command Reference

SYS Commands

Ruijie# clock update-calendar
Set the hardware time from the system clock.
Ruijie#show calendar
03:05:08 UTC Wed, Feb 29, 2012

Check Method

Platform
Description--

4.7 cpu high-watermark set
Use this command to set the high watermark of the CPU usage of the control core and enable CPU usage
monitoring.
cpu high-watermark set [ [ high high-value ] [ range range-value] ]Use this command to disable CPU usage monitoring.
no cpu high-watermark set

Use this command to restore the default settings.
default cpu high-watermark set

4-9

Command Reference

Parameter
Description

Defaults

SYS Commands

Parameter

Description

high high-value

Sets the high watermark of the CPU usage. The range is from 2 to 99.

range range-value

Sets the watermark fluctuation range. The range is from 1 to 20.

By default, the watermark of the CPU usage is 80% and the watermark fluctuation range is 5% (namely,
the range of the CPU usage watermark is from 75% and 85%).

Command

Global configuration mode

Mode

Default Level-

Usage Guide

You can use this command to set the high watermark of the CPU usage and enable CPU usage
monitoring. When detecting that the CPU usage exceeds the fluctuation range of the highest watermark,the system prints prompts.

Configuration

The following example sets the CPU usage watermark to the default value and enables CPU usage

Examplesmonitoring (if it is disabled).
Ruijie(config)# default cpu high-watermark set
Reset default cpu watermark monitor
set system cpu watermark high 80%(75%~85%)
The following example disables CPU usage monitoring.
Ruijie(config)# no cpu high-watermark set
Close cpu watermark monitor

The following example enables CPU usage monitoring. Keep the defined watermark value.
Ruijie(config)# cpu high-watermark set
Open cpu watermark monitor
set system cpu watermark high 80%(75%~85%)

The following example enables CPU usage monitoring and sets the high watermark to 88% and fluctuation
range to 3%.
Ruijie(config)# cpu high-watermark set high 88 range 3
Open cpu watermark monitor
set system cpu watermark high 88%(85%~91%)
In this case, the high watermark is set to 88%. The upper limit of the high watermark is 91% (88%+3%) andthe lower limit is 85% (88%-3%).
Check Method-

PromptIf the high watermark of the CPU usage is allowed to fluctuate from 85% to 91%, the system will print the

Messagefollowing warning message when the CPU usage exceeds the upper limit of the high watermark:*Jan 19 16:23:01: %RG_SYSMON-4-CPU_WATERMARK_HIGH: warning! system cpu usage above high4-10Command Reference

SYS Commands

watermark(85%),current cpu usage 100%
When the CPU usage is less than the lower limit of the high watermark, the system will print the following
message about warning release:*Jan 20 07:02:52: %RG_SYSMON-5- CPU_WATERMARK:withdraw warning! system cpu usage below highwatermark(85%), current cpu usage 36%

Platform
Description-

4.8 memory history clear
Use this command to clear the history of the memory usage.
memory history clear [ one-forth | half | all ]Parameter
Description

Parameter

Description

one-forth

Clears one fourth entries.

half

Clears a half of entries.

all

Clears all the entries.

Defaults-

Command

Global configuration mode

Mode

Default Level-

Usage Guide-

Configuration

The following example clears a half of the history of the memory usage.

ExamplesRuijie# show memory history
Time Thu Jan

1 00:24:45 1970

Used(k) 148516
Maxinum memory users for this period
Process Name

Holding

tcpip.elf

270028cli-memory

60600

rg_syslogd

36640

Time Thu Jan

1 00:24:41 1970

Used(k) 148492
Maxinum memory users for this period
Process Name

Holding

tcpip.elf

270028

4-11

Command Reference

SYS Commands

cli-memory52408

rg_syslogd

36640

Time Thu Jan

1 00:24:41 1970

Used(k) 148444
Maxinum memory users for this period
Process Name

Holding

tcpip.elf

270028cli-memory44088

rg_syslogd

36640

Ruijie(config)#memory history clear half
2 out of 5 records in the history table to be cleared...
Clear done !

Check Method

PromptMessage

Platform
Description

-

-

-

4.9 reload
Use this command to reload the device.
reload [ at { hour [ :minute [ :second ] ] } [ month [ day [ year ] ] ]Parameter
Description

Parameter

Description

hour [ :minute [ :second ] ]Sets the restart time in the format of hour : minute : second. Other
neglected parameters keep the current system values.

month

Sets the month, in the range from 1 to 12.

day

Sets the day, in the range from 1 to 31.

year

Sets the year, in the range from 1970 to 2069.

Defaults-

CommandPrivileged EXEC mode

Mode

Default Level-

Usage Guide-

Configuration

The following example reloads the device.

4-12Command Reference

Examples

SYS Commands

Ruijie# reload
Reload system?(Y/N) Y
Sending all processes the TERM signal...

[

OK

]

Sending all processes the KILL signal...

[

OK

]

Restarting system...

Check Method

PromptMessage

Platform
Description

-

-

-

4.10 show calendar
Use this command to display the hardware calendar.
show calendar

Parameter
Description

CommandParameter

Description--

Privileged EXEC mode/ global configuration mode

Mode

Default Level-

Usage Guide-

Configuration

The following example displays the hardware calendar.

ExamplesRuijie# show calendar
21:57:48 GMT Sun, Feb 28, 2012

PromptMessage

Platform
Description--

4.11 show clock
Use this command to display the system software clock.
show clock

Parameter

Parameter

Description

4-13

Command Reference

SYS Commands

Description-

Command-Privileged EXEC mode / global configuration mode

Mode

Default Level-

Usage Guide-

Configuration

The following example displays the software clock when the time zone is disabled.

ExamplesRuijie# show clock
18:22:20 UTC Tue, Dec 11, 2012

The following example displays the software clock when the time zone is enabled.
Ruijie# show clock
03:07:49 TSZ Wed, Feb 29, 2012

PromptMessage

Platform
Description--

4.12 show cpu
Use this command to display the information on the system task running on the control core instead of thenon-virtual core.
show cpu
Parameter
Description

CommandParameter

Description--

Privileged EXEC mode/ global configuration mode

Mode

Default Level-

Usage Guide

If the system is equipped with a virtual core, you can use the show processes cpu command to check the
CPU usage of the virtual core.

Configuration

The following example displays the information on the system task running on the control core instead of

Examplesthe non-virtual core.
Ruijie#show cpu

4-14

Command Reference

SYS Commands===============================================CPU Using Rate Information
CPU utilization in five seconds: 4.80%
CPU utilization in one minute: 4.10%
CPU utilization in five minutes: 4.00%
NO

5Sec

1Min

5Min Process

1

0.00%

0.00%

0.00% init

2

0.00%

0.00%

0.00% kthreadd

3

0.00%

0.00%

0.00% ksoftirqd/0

4

0.00%

0.00%

0.00% events/0--More--PromptMessage

Platform
Description

-

-

4-15

Command Reference

SYS Commands

4.13 show memory
Use this command to display the system memory.
show memory [ sorted total | history | low-watermark | process-id | process-name ]Parameter
Description

CommandParameter

Description

sorted total

Ranked according to the memory usage.

history

Displays the history of memory usage.

low-watermark

Displays the memory low watermark threshold of the system.

process-id

Displays the memory usage of the task specified by process-id.

process-nameDisplays the memory usage of the task specified by process-name.

Privileged EXEC mode/ global configuration mode

Mode

Default Level-

Usage Guide

Every time when the show memory history command is used, the number of displayed entries increases
by one. Up to 10 entries can be displayed. You can use the memory history clear command to clear
history entries.

Configuration

The following example displays the memory usage of each task and the ranking (based on the total

Examplesmemory usage).
Ruijie# show memory sorted total
System Memory: 508324K total, 481560K used, 26764K free, 31.5% used rate
Used detail:149112K active, 247776K inactive, 30460K mapped, 50460K slab, 3752K others

PID

Text(K) Rss(K)Data(K)

Stack(K) Total(K)Process

807

1568

4584

26472884270028

tcpip.elf

854

40

1436

24607684248840cli-filesystem

1237

52

1492

12326084126036cli-memory

803

56

1104

74064

84

76920

ping.elf

727

84

1276

33812

84

36640

rg_syslogd

733

84

796

33536

84

36364

rg_syslogd

776

224

1416

16896

84

19800

lsmdemo

858

40

1324

16844

84

19612

rg-tty-admin

769

40

3600

11052

84

13812

skbdemo--More-Description of some keywords in the command:

Keyword

Description

total

Total system memory

used

Used memory

4-16Command Reference

SYS Commands

freeRemaining memory

used rate

Memory usage (percentage)

ActiveActive page

inactive

Inactive page

mappedMapped memoryslab

Memory consumed by SlabMemory capacity of the used memory except theothersmemory used by active and inactive pages,
mapped memory, and slab memory.

Description of the displayed information on each task:

PromptMessage

Platform
Description

Field

Description

PID

Process ID

Text

Code segment size

Rss

Resident memory size

Data

Data segment size

Stack

Stack size

Total

Total used memory

Process

Task name--4.14 show processes cpu
Use this command to display system task information.
show processes cpu [ history [ table ] | [ 5sec | 1min | 5min | 15min ] [ nonzero ] ]Parameter
Description

Parameter

Description

5sec | 1min | 5min | 15min

Displays lists of tasks in descending order of CPU usage within thelast five seconds, one minute, five minutes, and 15 minutes.

Nonzero

Does not display the task with 0 CPU usage.

History

Displays the CPU usage of the control core within the last 60 seconds,
60 minutes, and 72 hours in histogram.

Table

Displays the CPU usage of the control core within the last 60 seconds,
60 minutes, and 72 hours in table.

CommandPrivileged EXEC mode/ global configuration mode

Mode

Default Level

-

4-17

Command Reference

SYS Commands

Usage Guide

Configuration

The following example displays the tasks listed in ascending order of task IDs.

ExamplesRuijie# show processes cpu
System Uptime: 19:08.6
CPU utilization for five seconds:1.2%; one minute:0.8%; five minutes:0.8%
set system cpu watermark (open): high 80%(85%~75%)
Tasks Statistics: 375 total, 10 running, 365 sleeping, 0 stopped, 0 zombie
Pid Vsd S

PRI P

5Sec

1Min

5Min

15Min Process

1

0 S

20 0

0.0(0.0)

0.0(0.0)

0.0(0.0)

0.0(0.0) init

2

0 S

20 1

0.0(0.0)

0.0(0.0)

0.0(0.0)

0.0(0.0) kthreadd

3

0 S -100 00.0(0.0)

0.0(0.0)

0.0(0.0)

0.0(0.0) migration/0

4

0 S

20 0

0.0(0.0)

0.0(0.0)

0.0(0.0)

0.0(0.0) ksoftirqd/0

50 S -100 1

0.0(0.0)

0.0(0.0)

0.0(0.0)

0.0(0.0) migration/1--More-The following example displays the tasks listed in ascending order of task IDs without displaying the tasks
with 0 CPU usage within 15 minutes.
Ruijie# show processes cpu nonzero
Description of the information displayed in this command:

Field

Description

System Uptime

Total running time of the device, precious to seconds.

CPU Utilization

Virtual CPU usage

Tasks Statistics
set system cpu
watermarkTotal CPU usage of the control core within the last five seconds, one
minute, and five minutes.
Total CPU usage of the virtual control core within the last five seconds,
one minute, and five minutes.
Task statistics information, including the total number of statistics tasks
and the task status.
CPU watermark value and status of the control core.

The task running statuses are listed below:

Task Running Status

Description

running

Running task

sleeping

Suspended task

stoppedStopped task

zombieTerminated task, but not reclaimed by the system

Description of each task:

Field

Description

4-18

Command Reference

SYS Commands

Pid

Task ID
Task status. Five statuses in total: R (running), T (stopped), S

S(sleeping), D (waiting), and Z (zombie).

PRI

Task running priority

P

The core of the CPU on which the task runs
CPU usage of the task within the last five seconds, one minute, five

5sec/1min/5min/15minminutes, and 15 minutes. The value in the round brackets is the CPU
usage that is not divided by the total number of cores where the task
runs.
Task name.

Process

Only the first 15 characters are displayed. The remaining characters
are truncated.

The following example displays the CPU usage in ascending order of task IDs and only the processes with
non-zero CPU usage within 15 minutes are displayed.
Ruijie #show processes cpu nonzero

The following example displays the CPU usage in descending order within five seconds and the tasks withzero CPU usage within one second are not displayed.
Ruijie #show processes cpu 5sec nonzero
The following example displays the CPU usage of the control core in histograms within the last 60
seconds, 60 minutes, and 72 hours.
The first histogram displays the CPU usage of the control core within 300 seconds. Every segment in the
x-coordinate is five seconds, and every segment in the y-coordinate is 5%. The symbol "*" indicates the
CPU usage at the last specified second. In other words, the first segment on the x-coordinate
nearest to 0 is the CPU usage in the last five seconds, measured in %.
The second histogram displays the CPU usage of the control core within the last 60 minutes, measured
in %. Every segment on the x-coordinate is 1 minute.
The third histogram displays the CPU usage of the control core within the last 72 hours, measured in %.
Every segment on the x-coordinate is 1 hour.
Example:Ruijie#show processes cpu history
system cpu percent usage(%) [last 300 second]
_
100|
95|
90|
85|
80|
75|
70|
65|
60|

4-19

Command Reference

SYS Commands
55|
50|
45|
40|*********
35||||||||||
30||||||||||*
25|||||||||||
20|||||||||||
15|||||||||||
10|||||||||||
5|||||||||||***************
0||||||||||||||||||||||||||#=========#=========#=====*==>
0

50

100

secondsystem cpu percent usage(%) per 5second (last 125 second)--------------------------------------------------------------------------------

system cpu percent usage(%) [last 60 minute]
_
100|
95|
90|
85|
80|
75|
70|
65|
60|
55|
50|
45|
40|
35|
30|*
25||
20||
15||
10||
5||*
0|||
#==*==>
0minutesystem cpu percent usage(%) per 1minute (last 2 minute)-------------------------------------------------------------------------------4-20

Command Reference

SYS Commands

The following example displays the CPU usage of the core 0 in tables within the last 60 seconds, 60
minutes, and 72 hours.
The first table lists the CPU usage within 300 seconds. The first cell indicates the CPU usage within thelast five seconds.
The second table lists the CPU usage within the last 60 minutes, measured in %. The two adjacent cells
show the CPU usage measured at an interval of one minute.
The third table lists the CPU usage within the last 72 hours, measured in %. The two adjacent cells show
the CPU usage measured at an interval of one hour.
Example:Ruijie #show processes cpu history tablesystem cpu percent usage(%) [last 300 second]#------------------------------------------------------------------------------#
|

|

1|

2|

3|

4|

5|

6|

7|

8|

9|

10|

#------------------------------------------------------------------------------##------------------------------------------------------------------------------#
|

0|

2.0|

2.4|

2.3|

2.3|

2.8|

3.0|

2.7|

3.2|

2.6|

2.4|

#------------------------------------------------------------------------------#
|

1|

2.7|

2.5|

2.7|

2.2|

2.4|

2.6|

2.2|

2.7|

2.3|

2.5|

#------------------------------------------------------------------------------#
|

2|

2.9|

2.0|

2.4|

2.5|

2.7|

2.4|

2.4|

2.6|

2.6|

2.5|

#------------------------------------------------------------------------------#
|

3|

2.7|

2.8|

2.8|

3.2|

2.5|

3.2|

3.1|

4.0|

2.7|

2.7|

#------------------------------------------------------------------------------#
|

4|

4.0|

2.3|

2.1|

2.2|

2.7|

2.4|

2.5|

2.6|

2.4|

2.6|

#------------------------------------------------------------------------------#
|

5|

2.4|

3.2|

2.5|

2.3|

2.3|

3.6|

2.8|

2.5|

2.2|

2.4|

#------------------------------------------------------------------------------#
system cpu percent usage(%) [last 60 minute]#------------------------------------------------------------------------------#
|

|

1|

2|

3|

4|

5|

6|

7|

8|

9|

10|

#------------------------------------------------------------------------------##------------------------------------------------------------------------------#
|

0|

2.6|

2.5|

3.0|

2.4|

2.6|

#------------------------------------------------------------------------------#

PromptMessage

Platform
Description--

4.15 show processes cpu detailed
Use this command to display the details of the specified task.

4-21

Command Reference

SYS Commands

show processes cpu detailed { process-id | process-name }Parameter
Description

CommandParameter

Description

process-id

Displays the information on the task of the specified task ID.

process-nameDisplays the information on the task of the specified task name.

Privileged EXEC mode/ global configuration mode

Mode

Default Level-

Usage Guide

Configuration

The following example displays the information on the task of the specified task name.

ExamplesRuijie# show processes cpu detailed demo
Process Id: 1820

Process Name

: demoVsdid: 0

Process Ppid

: 1

State

: R(running)

On CPU: 0

Priority: 20

Age Time: 24:06.5

Run Time: 00:01.0

Cpu Usage

:

Lass

5 sec

0.3% (0.6%)

Lass

1 min

0.3% (0.6%)

Lass

5 min

0.3% (0.6%)

Lass 15 min

0.3% (0.6%)

Tty

: ?

Code Usage: 209.6 KB. If the specified task name is not unique, the system displays the following
message:Ruijie# show processes cpu detailed demo
duplicate process, choose one by id not name.
name: demo, id: 1089, state: S(sleeping)
name: demo, id: 1091, state: R(running)process name: monitor_procps, do NOT exist, or NOT only one.
Description of the displayed information:

Field

Description

4-22

Command Reference

SYS Commands

Process Id

Task ID

Process Name

Task name

Process Ppid

Parent process task ID

State

Task running status

On CPU

CPU where the task is running

Priority

Task priority

Age Time

Duration for the task from self-startup to now

Run Time

Duration for the task from self-startup to being executed
CPU usage of the task within the last five seconds, one minute, fiveminutes, and 15 minutes.

Cpu Usage

The value in the round brackets is the CPU usage that is not divided by the
total number of cores where the task runs. For example, the demo task isrunning on No.0 core, which is the control core and the system has twocontrol cores. In this case, the CPU usage is 0.3% (0.6%).

Tty
Code Usage

Tty ID, in the format of "Primary device ID, secondary device ID". If it is0, the value is ?.
Size occupied by the task code segment

The following example displays the information on the task of the specified task ID.
Ruijie# show process cpu detailed 1715

PromptMessage

Platform
Description--

4.16 show reboot-reason
Use this command to display the reboot reason.
show reboot-reason [ all ]Parameter
Description

CommandParameter

Description

all

Displays the reboot reason of all devices/service modules

Privileged EXEC mode/ global configuration mode/ User EXEC mode

Mode

Default Level-

Usage Guide-

Configuration

The following example displays the reboot reason of the device.

ExamplesRuijie#show reboot-reason

4-23

Command Reference

SYS Commands

time: 1970-01-01 08:03:13
reason: reload cmd
info: /sbin/rg-sysmon/3844
Ruijie#Prompt-Message

Platform-

Description

4.17 show version
Use this command to display the system version information.
show version
Parameter
Description

CommandParameter

Description--

Privileged EXEC mode/ global configuration mode

Mode

Default Level-

Usage Guide-

Usage Guide

The following example displays the system version information.
Ruijie#show version
System description: Ruijie Full Gigabit Security Intelligence AccessSwitch(RG-HS2310-16GH2GT1XS) By Ruijie Networks
System start time

: 1970-01-01 05:59:59

System uptime: 0:02:00:09

System hardware version : 1.00
System software version : HS2310_RGOS 11.4(1)B90, Release(10222017)
System patch number: NA

System serial number: MACC942570105

System boot version: 1.0.2

Module information:
Slot 0 : RG-HS2310-16GH2GT1XS
Hardware version: 1.00

Boot version: 1.0

Software version: HS2310_RGOS 11.4(1)B90, Release(10222017)

Serial number: MACC942570105

4-24

Command Reference

SYS Commands

Ruijie#PromptMessage

Platform
Description

-

-

4-25

Command ReferenceTime Range Commands

5 Time Range Commands
5.1 absolute
Use this command to configure an absolute time range.
absolute { [ start time date ] [ end time date ] }Use the no form of this command to remove the absolute time range.
no absolute

Parameter
Description

Parameter

Description

start time date

Indicates the start time of the range.

end time date

Indicates the end time of the range.

Defaults

The default absolute time range is the maximum range.

CommandTime range configuration mode

Mode

Default Level

14

Usage Guide

Use the absolute command to configure a time absolute time range between a start time and an end
time to allow a certain function to take effect within the absolute time range.
The maximum absolute time range is from 00:00 January 1, 0 to 23:59 December 31, 9999.

Configuration

The following example creates a time range and enters time range configuration mode.

ExamplesRuijie(config)# time-range no-httpRuijie(config-time-range)#

The following example configures an absolute time range.
Ruijie(config-time-range)# absolute start 1:1 1 JAN 2013 end 1:1 1 JAN 2014

Check
MethodPromptMessage

Platform
Description

Use the show time-range [ time-range-name ] command to display the time range configuration.

-

-

5-1

Command ReferenceTime Range Commands

5.2 periodic
Use this command to configure periodic time.
periodic day-of-the-week time to [ day-of-the-week ] time

Use the no form of this command to remove the configured periodic time.
no periodic day-of-the-week time to [ day-of-the-week ] time

Parameter
Description

Parameter

Description

day-of-the-week

Indicates the week day when the periodic time starts or ends.

time

Indicates the exact time when the periodic time starts or ends.

Defaults

No periodic time is configured by default.

CommandTime range configuration mode

Mode

Default Level

14

Usage Guide

Use the periodic command to configure a periodic time interval to allow a certain function to take effectwithin the periodic time.

Configuration

The following example creates a time range and enters time range configuration mode.

ExamplesRuijie(config)# time-range no-httpRuijie(config-time-range)#

The following example configures a periodic time interval.
Ruijie(config-time-range)# periodic Monday 1:1 to Tuesday 2:2

Check
MethodPromptMessage

Platform
Description

Use the show time-range [ time-range-name ] command to display the time range configuration.

--

5.3 show time-range
Use this command to display the time range configuration.
show time-range [ time-range-name ]5-2Command Reference

Parameter
Description

CommandTime Range Commands

Parameter

Description

time-range-nameDisplays a specified time range.

Privileged EXEC mode

Mode

Default Level

14

Usage Guide

Use this command to check the time range configuration.

Configuration

The following example displays the time range configuration.

ExamplesRuijie# show time-range
time-range entry: test (inactive)
absolute end 01:02 02 February 2012

PromptMessage

Platform
Description--

5.4 time-range
Use this command to create a time range and enter time range configuration mode.
time-range time-range-name

Use the no form of this command to remove the configured time range.
no time-range time-range-nameParameter
Description

Parameter

Description

time-range-name

Time range nameDefaults

No time range is configured by default.

Command

Global configuration mode

Mode

Default Level

2

Usage Guide

Some applications (such as ACL ) may run based on time. For example, an ACL can be effective withincertain time ranges of a week. To this end, first you must configure a time range. After the time range is

5-3

Command ReferenceTime Range Commands

created, you can configure relevant time control in time range mode.

Configuration

The following example creates a time range.

ExamplesRuijie(config)# time-range no-httpRuijie(config-time-range)#

Check
MethodPromptMessage

Platform
Description

Use the show time-range [ time-range-name ] command to display the time range configuration.

-

-

5-4

Command Reference

HTTP Service Commands

6 HTTP Service Commands
6.1 enable service web-server
Use this command to enable the HTTP service function.
Use the no or default form of this command to disable the HTTP service function.
enable service web-server [ http | https | all ]no enable service web-server [ http | https ]default enable service web-server [ http | https ]Parameter
Description

Parameter

Description

httpEnables the HTTP service.

httpsEnables the HTTPS service.

all

Enables both the HTTP service and the HTTPS service.

Defaults

By default, the HTTP service function is disabled.

Command

Global configuration mode.

mode

Usage Guide

If run a command ends with the keyword all or without keyword, it indicates enabling both the HTTP
service and the HTTPS service; if run a command ends with keyword http, it indicates enabling the
HTTP service; if run a command ends with keyword https, it indicates enabling the HTTPS service.
Use the command no enable service web-server to disable the corresponding HTTP service.

Configuration

The following example enables both the HTTP service and the HTTPS service:

ExamplesRuijie#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#enable service web-server

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

http port
Use this command to configure the HTTP port number.
Use the no form of this command to restore the default HTTP port number.

6-1

Command Reference

HTTP Service Commands

http port port-number
no http port

Parameter
Description

Parameter

Description

port-number

Configures the HTTP port number. The value includes 80, 1025 to
65,535.

Defaults

The default HTTP port number is 80.

Command

Global configuration mode.

mode

Usage Guide

Use this command to configure the HTTP port number.

Configuration

The following example configures the HTTP port number as 8080:

ExamplesRuijie(config)#http port 8080

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

6.2 http secure-port
Use this command to configure the HTTPS port number.
Use the no form of this command to restore the default HTTPS port number.
http secure-port port-number
no http secure-port

Parameter
Description

Parameter

Description

port-number

Configures the HTTPS port number. The value includes 443, 1025 to
65,535.

Defaults

The default HTTP port number is 443.

Command

Global configuration mode.

mode

Usage Guide

Use this command to configure the HTTPS port number.

6-2

Command Reference

HTTP Service Commands

Configuration

The following example configures the HTTPS port number as 4443:

ExamplesRuijie(config)#http secure-port 4443

RelatedCommands

Command

Description

enable service web-server

Enables the HTTP service.

show web-server status

Displays the configuration and status of the
Web service.

Platform

N/A

Description

6.3 show web-server status
Use this command to display the configuration and status of the Web service.
show web-server status

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

mode

Usage Guide

N/A

Configuration

The following example displays the configuration and status of the Web service:

ExamplesRuijie#show web-server status
http server status : enabled
http server port : 80
https server status: enabled
https server port: 443

RelatedCommands

Platform

Command

Description

enable service web-server

Enables the HTTP service.

http port

Configures the HTTP port number.

http secure-port

Configures the HTTPS port number.

N/A

Description

6-3

Command Reference

HTTP Service Commands

6.4 upgrade web
Use this command to upgrade the Web package in local file system.
upgrade web uri

Parameter
Description

Parameter

Descriptionuri

The storage path of the Web package.

Defaults

N/A

CommandPrivileged EXEC mode

mode

Usage Guide

Please use the copy command to copy the Web package into the file system before you use thiscommand to upgrade the Web package.

Configuration

The following example copies a Web package into the file system and upgrades the package.

ExamplesRuijie#copy tftp://192.168.23.24/web.upd flash:/web.upd
Ruijie#upgrade web flash:/web.upd

RelatedCommands

Platform

Command

Description

enable service web-server

Enables the HTTP service.

N/A

Description

6.5 upgrade web download
Use this command to download the Web package from the TFTP server and upgrade the package
automatically.
upgrade web download tftp: path

Parameter
Description

Parameter

Description
path indicates the storage path of the Web package on the TFTP
server.

tftp: path

tftp indicates the system downloads the Web package from the TFTP
server through the physical port and upgrades the Web package
automatically.

Defaults

N/A

6-4

Command Reference

Command

HTTP Service Commands

Global configuration mode.

mode

Usage Guide

N/A

Configuration

The following example downloads a Web package from the TFTP server and upgrades the package

Examplesautomatically.
Ruijie#upgrade web download tftp://192.168.23.24/web.upd

RelatedCommands

Platform

Command

Description

enable service web-server

Enables the HTTP service.

N/A

Description

6.6 webmaster level
Use this command to configure the username and password for Web login authentication. Use the noform of this command to restore the default setting.
webmaster level privilege-level username name password { password | [ 0 | 7 ]encrypted-password }no webmaster level privilege-level [ username name ]Parameter
Description

Defaults

CommandParameter

Description

privilege-level

Configures the user privilege-level.

name

Username.

password

Password.

0|7

Password type; 0 indicates plaintext, 7 indicates ciphertext.

encrypted-password

Password text.

By default, two users are configured.
1.

User1 is configured with privilege level 1, username of admin and plaintext password of admin.

2.

User2 is configured with privilege level 2, username of guest and plaintext password of guest.

Global configuration mode.

mode

Usage Guide

When HTTP is enabled, users can log in to the Web interface only after being authenticated. Use thiscommand to configure the username and password for Web login authentication.
Use the no webmaster level privilege-level command to delete all the usernames and passwords
with a specified privilege-level.

6-5

Command Reference

HTTP Service Commands

Use the no webmaster level privilege-level username name command to delete the specified
username and password.
Usernames and passwords come with three permission levels, each of which includes at most
10 usernames and passwords.

Configuration

The following example configures the username and password for Web login authentication,

ExamplesRuijie(config)#webmaster level 0 username ruijie password Nihao123!

RelatedCommands

Platform

Command

Description

enable service web-server

Enables the HTTP service.

N/A

Description

6-6

Command Reference

Syslog Commands

7 Syslog Commands
7.1 clear logging
Use this command to clear the logs from the buffer in privileged EXEC mode.
clear logging
Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandMode

Usage Guide

Privileged EXEC modeThis command clears the log packets from the memory buffer. You cannot clear the statistics of thelog packets.

Configuration

The following example clears the log packets from the memory buffer.

ExamplesRuijie# clear logging

RelatedCommandFunction

Commands

logging on

Turns on the log switch.

show logging

Displays the logs in the buffer.

logging buffered

Records the logs in the memory buffer.

Platform
Description

N/A

7.2 logging
Use this command to send the log message to the specified syslog server.
logging { ip-address | ipv6 ipv6-address } [ udp-prot port ]Use this command to delete the specified syslog server.
no logging { ip-address] | ipv6 ipv6-address }Use this command to restore the default port 514.
no logging { ip-address | ipv6 ipv6-address } udp-prot

Parameter
Description

Parameter

Description

ip-address

Sets the IP address of the host receiving log messages.

7-1Command Reference

ipv6-address
udp-port port

Syslog Commands

Sets the IPv6 address of the host receiving log messages.
Sets the port number of the host receiving log messages. The default
is 514.

Defaults

No log message is sent to syslog server by default.

Command

Global configuration mode

Mode

Usage Guide

This command is used to configure a syslog server to receive log messages from the device. You canconfigure up to five syslog servers, log messages are sent to all configured syslog servers
simultaneously,

Configuration

The following example configures a syslog server with IP address 202.101.11.1.

ExamplesRuijie(config)# logging 202.101.11.1
The following example configures a syslog server with IP address 10.1.1.100 and port number 8099.
Ruijie(config)# logging 202.101.11.1 udp-port 8099
The following example configures a syslog server with IPv6 address AAAA:BBBB::FFFF.
Ruijie(config)# logging ipv6 AAAA:BBBB::FFFF

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.3 logging buffered
Use this command to set the memory buffer parameters (log severity, buffer size) for logs at global
configuration layer. Use the no form of the command to disable recording logs in the memory buffer.
Use the default form of this command to restore the default setting.
logging buffered [ buffer-size | level ]no logging buffereddefault logging buffered
Parameter
Description

Parameter
buffer-size

level

Defaults

Description
Size of the buffer is related to the specific device type:
For the access switches, 4 K to 1 M Bytes.
Severity of logs, from 0 to 7. The name of the severity or thenumeral can be used.

The buffer size is related to the specific device type.

7-2

Command Reference

Syslog Commands

access switches: 128 K Bytes;
The log severity is 7.

CommandMode

Global configuration mode

Usage Guide

The memory buffer for log is used in recycled manner. That is, when the memory buffer with thespecified size is full, the oldest information will be overwritten. To show the log information in thememory buffer, run the show logging command in privileged user mode.
The logs in the memory buffer are temporary, and will be cleared in case of device restart or the
execution of the clear logging command in privileged user mode. To trace a problem, it is required
to record logs in flash or send them to Syslog Server.
The log information is classified into the following 8 levels (Table 1):
Table-1
KeywordLevel

Description

Emergencies

0

Alerts1

Problems that need immediate remedy

Critical2

Critical conditions

Errors3

Error message

warnings

4

Alarm information

Notifications

5

informational

6

Descriptive information

Debugging

7

Debugging messages

Emergency case, system cannot run
normally

Information that is normal but needs
attention

Lower value indicates higher level. That is, level 0 indicates the information of the highest level.
When the level of log information to be displayed on devices is specified, the log information at or
below the set level will be allowed to be displayed.
After running the system for a long time, modifying the log buffer size especially in condition oflarge buffer may fails due to the insufficent availble continuous memory. The failure message
will be shown. It is recommended to modify the log buffer size as soon as the system starts.

Configuration

The following example allows logs at and below severity 6 to be recorded in the memory buffer sized

Examples

10,000 bytes.
Ruijie(config)# logging buffered 10000 6

RelatedCommand

Description

Commands

logging on

Turns on the log switch.

show logging

Displays the logs in the buffer.

7-3

Command Reference

clear logging

Platform
Description

Syslog Commands

Clears the logs in the log buffer.

N/A

7.4 logging console
Use this command to set the severity of logs that are allowed to be displayed on the console in global
configuration mode. Use the no form of this command to prohibit printing log messages on the console.
logging console [ level ]no logging console
Parameter

Parameter

Description

Description
Severity of log messages, 0 to 7. The name of the severity orlevel

the numeral can be used. For the details of log severity, seetable 1.

Defaults

CommandMode

Usage Guide

The default is debugging (7).

Global configuration mode

When a log severity is set, the log messages at or below that severity will be displayed on the
console.
The show logging command displays the related setting parameters and statistics of the log.

Configuration

The following example sets the severity of log that is allowed to be displayed on the console as 6:

ExamplesRuijie(config)# logging console informational

RelatedCommand

Description

Commands

logging on

Turns on the log switch.

show logging

Platform
Description

Displays the logs and related log configuration parametersin the buffer.

N/A

7.5 logging countUse this command to enable the log statistics function in global configuration mode. Use the no form of
this command to restore the default setting.
logging count7-4

Command Reference

Syslog Commands

no logging countParameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

The log statistics function is disabled by default.

Global configuration modeThis command enables the log statistics function. The statistics begins when the function is enabled.
If you run the no logging count command, the statistics function is disabled and the statistics data isdeleted.

Configuration

The following example enables the log statistics function:

ExamplesRuijie(config)# logging countRelatedCommand

Description

Commands

show logging countDisplays log information about modules of the system.
Displays basic configuration of log modules and log

show logging

Platform
Description

information in the buffer.

N/A

7.6 logging facility
Use this command to configure the device value of the log information in global configuration mode.
Use the no form of the command to restore the default setting.
logging facility facility-type
no logging facility
Parameter
Description

Defaults

Parameter
facility-type

Description
Syslog device value. For specific settings, refer to the usage
guide.

The default is 23 if the RFC5424 format is enabled (Local7, local use).
The default is 16 if the RFC5424 format is disabled (Local0, local use).

CommandMode

Global configuration mode

7-5

Command Reference

Usage Guide

Syslog Commands

The following table (Table-2) is the possible device values of Syslog:
Numerical CodeFacility

0 (kern)

Kernel messages

1 (user)

User-level messages

2 (mail)

Mail system

3 (daemon)

System daemons

4 (auth1)

security/authorization messages

5 (syslog)

Messages generated internally by syslogd

6 (lpr)Line printer subsystem

7 (news)

USENET news

8 (uucp)

Unix-to-Unix copy system

9 (clock1)

Clock daemon

10 (auth2)

security/authorization messages

11 (ftp)

FTP daemon

12 (ntp)

NTP subsystem

13 (logaudit)

log audit

14 (logalert)

log alert

15 (clock2)

clock daemon

16 (local0)

Local use

17 (local1)

Local use

18 (local2)

Local use

19 (local3)

Local use

20 (local4)

Local use

21 (local5)

Local use

22 (local6)

Local use

23 (local7)

Local use

The default device value of RGOS is 23 (local 7).

Configuration

The following example sets the device value of Syslog as kernel:

ExamplesRuijie(config)# logging facility kern

RelatedCommandCommands

Platform
Description

logging console

Description
Sets the severity of logs that are allowed to be displayedon the console.

N/A

7-6

Command Reference

Syslog Commands

7.7 logging file
Use this command to save log messages in the log file, which can be saved in hardware disk,
expanded FLASH, USB or SD card. Use the no form of this command to restore the default setting,logging file { flash:filename } [ max-file-size ] [ level ]no logging fileParameter
Description

Parameter

Description

flash

Saves the log file in expanded FLASH.

filename

Sets the file name. The file type is omitted, which is fixed as txt.
Sets the maximum file size, in the range from 128K to 6M bytes, The

max-file-size

default is 128K,
Sets the level of the log message saved in the log file, which can beleveleither the level name or the level number. The default is 6. See
Usage Guide for details.

Defaults

Log messages are not saved in expanded FLASH by default.

Command

Global configuration mode

Mode

Usage Guide

You can save log messages in expanded FLASH if you don’t want to transmit log messages on the
network or there is no syslog server,
The log file cannot be configured with the suffix, which is fixed as txt.
If there is no expanded FLASH, the logging file flash command is hidden automatically andcannot be configured.

Configuration

KeywordLevel

Description

Emergencies

0

Alerts1

Critical2

Critical message.

Errors3

Error message.

warnings

4

Alarm message.

Notifications

5

informational

6

Descriptive message.

Debugging

7

Debugging message

Emergency case. The system fails torun.
Problem that call for immediate
solution.

message that is normal but calls forattention.

The following example saves the log message in expanded FLASH and sets file name, file size and7-7Command Reference

ExamplesSyslog Commands

log level to syslog.txt, 128K and 6 respectively.
Ruijie(config)# logging file flash:syslog

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.8 logging file numbers
Use this command to set the number of log files written into FLASH. Use the no form of thiscommand to restore the default setting.
logging file numbers numbers
no logging file numbers

Parameter
Description

Parameter

numbers

Defaults

The default is 16.

Command

Global configuration mode

Description
Sets the number of log files written into FLASH, in the range from 2 to
16.

Mode

Usage Guide

The system does not delete previously generated log files even if you change this configuration,
Therefore, you need to delete the log files manually to save FLASH size (you can send log files to theserver through TFTP before that). For example, 16 log files are generated by default before you want
to change the number to 2. New logs are overwritten constantly in log files indexed 0 to 1. However,log files indexed from 2 to 16 remain. You can delete these log files manually as needed.

Configuration

The following example sets the number of log files written into FLASH to 8.

ExamplesRuijie(config)# logging file numbers 8

RelatedCommands

Platform
Description

Command

Description

N/A

N/A

N/A

7-8

Command Reference

Syslog Commands

7.9 logging filter direction
Use this command to filter the log messages destined to a certain direction. Use the no form of thiscommand to restore the default setting.
logging filter direction { all | buffer | file | server | terminal }no logging filter direction { all | buffer | file | server | terminal }Parameter
Description

ParameterallbufferDescription
Log messages destined to all directions are filtered, including
console, VTY terminal, log buffer, log file and log server.
Log messages destined to the log buffer are filtered, including log
messages displayed by running the show logging command.

file

Log messages destined to the log file are filtered.

server

Log messages destined to the log server are filtered.

terminal

Log messages destined to the console and the VTY terminal(including Telnet and SSH).

Defaults

Log messages destined to all directions are filtered by default.

Command

Global configuration mode

Mode

Usage Guide

In general, log messages destined to all directions are filtered, including console, VTY terminal, log
buffer, log file and log server. If you want to filter log messages destined to a certain direction, theterminal for instance, configure the terminal parameter.

Configuration

The following example filters log messages destined to the terminal (including the console and the

Examples

VTY terminal).
Ruijie(config)# logging filter direction terminal

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.10 logging filter rule
Use this command to configure the filter rule of the log message,
logging filter rule { exact-match module module-name mnemonic mnemonic-name level level |single-match [ level level | mnemonic mnemonic-name | module module-name ] }7-9Command Reference

Syslog Commands

Use this command to delete the “exact-match” filter rule.
no logging filter rule exact-match [ module module-name mnemonic mnemonic-name level
level ]
Use this command to delete the “single-match” filter rule.
no logging filter rule single-match [ level level | mnemonic mnemonic-name | module
module-name ]Parameter
Description

Parameter

Description

exact-match

Exact-match filter rule. Fill in all the following three parameters.

single-match

Single-match filter rule. Fill in one of the following three parameters.

module module-name

Module name.

mnemonic mnemonic-nameMnemonic name.

level level

Log level,

Defaults

No filter rule is configured by default,

Command

Global configuration mode

Mode

Usage Guide

If you want to filter a specific log message, use the “exact-match” filter rule and fill in all threeparameters, namely, module name, mnemonic name and log level.
If you want to filter a specific kind of log messages, use the “single-match” filter rule and fill in one ofthree parameters, namely, module name, mnemonic name and log level.
When configured with the same module name, mnemonic name or log level, the “single-match” filter
rule has a higher priority than the “exact-match” filter rule,

Configuration

The following example configures the “exact-match” filter rule with parameters of module nameExamples

LOGIN, log level 5 and mnemonic name LOGOUT.
Ruijie(config)# logging filter rule exact-match module LOGIN mnemonic LOGOUT
level 5
The following example configures the “single-match” filter rule with the parameter of module name
SYS.
Ruijie(config)# logging filter rule single-match module SYS

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7-10

Command Reference

Syslog Commands

7.11 logging filter type
Use this command to configure the filter type of log messages. Use the no form of this command torestore the default setting.
logging filter type { contains-only | filter-only }no logging filter type

Parameter
Description

Parameter

Description

contains-only

The log message containing the key word of the filter rule is printed.

filter-only

The log message containing the key word of the filter rule is filtered.

Defaults

The default filter type is filter-only.

Command

Global configuration mode

Mode

Usage Guide

1.

When too many log messages are printed, the terminal screen keeps being refreshed. If you are
not concerned with these log messages, use the “filter-only” filter type to filter the log messages,

2.

If you are concerned with certain log messages, use the “contains-only” filter type to print log
messages containing the key word of the filter rule, so as to monitor whether certain events
happen.
In real operation, the contains-only and the fitler-only filter types cannot be configured at thesame time.
If you configure the filter direction and the filter type without configuring the filter rule, the log
messages are not filtered.

Configuration

The following example sets the filter type to contains-only.

ExamplesRuijie(config)# logging filter type contains-only

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.12 logging flash flush
Use this command to write log messages in the system buffer into the flash file immediately.
logging flash flush

7-11

Command Reference

Parameter
Description

Syslog Commands

Parameter

Description

N/A

N/A

Defaults

N/A

Command

Global configuration mode

Mode

Usage Guide

In general, the log messages are cached in the log buffer. Only when the buffer is full or the timer
expires are log messages written into the flash file. This command is used to write log messages inthe system buffer into the flash file immediately.
The logging flash flush command takes effect only once for each configuration. The log
messages cached in the buffer are written into the flash file immediately after configuration.

Configuration

The following example writes log messages in the system buffer into the flash file immediately.

ExamplesRuijie(config)# logging flash flush

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.13 logging flash interval
Use this command to set the interval to write log messages into the flash file, Use the no form of thiscommand to restore the default setting.
logging flash interval seconds
no logging flash intervalParameter
Description

Parameter

Description

interval seconds

The interval to write log messages into the flash file, in the range from
1 to 51840 in the unit of seconds.

Defaults

The default is 3600.

Command

Global configuration mode

Mode

Usage Guide

This command is used to set the interval to write log messages into the flash file. The timer starts

7-12Command Reference

Syslog Commands

after configuration, If you want to restore the interval to 3600 seconds, use the no logging flash
interval command.
To avoid writing log messages into the flash file too frequently, it is not recommended to set a
short interval.

Configuration

The following example sets the interval to write log messages into the flash file to 300 seconds.

ExamplesRuijie(config)# logging flash interval 300

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.14 logging life-time
Use this command to configure the preservation duration of logs in expanded FLASH. Use the noform of this command to restore the default setting.
logging life-time level level days
no logging life-time level level

Parameter
Description

Parameter

Description
Sets the log level, which can be either the level name or the level

level

number.

days

Sets the preservation duration of logs.

Defaults

No preservation duration is set by default.

Command

Global configuration mode

Mode

Usage Guide

Due to difference in expanded FLASH size and log level, logs with different levels can be configured
with different preservation durations.
Once log preservation based on time is enabled, log preservation based on file size is disabled
automatically. The log files are stored under the syslog/ directory of the expanded FLASH,

Configuration

The following example sets the preservation duration of logs whose level is 6 to 10 days.

ExamplesRuijie(config)# logging life-time level 6 10

RelatedCommand

Description

7-13

Command Reference

Syslog Commands

Commands
N/A

Platform

N/A

N/A

Description

7.15 logging monitor
Use this command to set the severity of logs that are allowed to be displayed on the VTY window(telnet window, SSH window, etc.) in global configuration mode. Use the no form of this command todisable this function.
logging monitor [ level ]no logging monitor
Parameter

Parameter

Description

Description
Severity of the log message. The name of the severity or thelevel

numeral can be used. For the details of log severity, see
Table-1.

Defaults

CommandMode

Usage Guide

The default is debugging (7).

Global configuration mode

To print log information on the VTY window, run the terminal monitor command in privileged EXEC
mode. The level of logs to be displayed is defined by logging monitor.
The log level defined with "Logging monitor" is for all VTY windows.

Configuration

The following example sets the severity of log that is allowed to be printed on the VTY window as 6:

ExamplesRuijie(config)# logging monitor informational

RelatedCommand

Description

Commands

logging on

Turns on the log switch.

show logging

Platform

Displays the log messages and related log configuration
parameters in the buffer.

N/A

Description

7-14

Command Reference

Syslog Commands

7.16 logging on
Use this command globally to allow logs to be displayed on different devices. Use the no form of thiscommand to disable this fucntion.
logging on
no logging on
Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

Logs are allowed to be displayed on different devices.

Global configuration mode

Log information can not only be shown in the Console window and VTY window, but also berecorded in different equipments such as the memory buffer, the expanded FLASH and the Syslog
Server. This command is the total log switch. If this switch is turned off, no log will be displayed orrecorded unless the severity level is greater than 1.

Configuration

The following example disables the log switch on the device.

ExamplesRuijie(config)# no logging on

RelatedCommand

Description

Commands

logging buffered

Records the logs to a memory buffer.

logging server

Sends logs to the Syslog server.

logging file flash:

Records logs on the expanded FLASH.

logging console

Allows the log level to be displayed on the console.

logging monitor
logging trap

Platform
Description

Allows the log level to be displayed on the VTY window(such as telnet window) .
Sets the log level to be sent to the Syslog server.

N/A

7.17 logging rate-limit
Use this command to enable log rate limit function to limit the output logs in a second in the global
configuration mode. Use the no form of this command to disable this function.
logging rate-limit { number | all number | console { number | all number } } [ except severity ]no logging rate-limit

7-15Command Reference

Parameter
Description

Parameter
numberallconsoleSyslog Commands

Description
The number of logs that can be processed in a second in therange from 1 to 10000.
Sets rate limit to all the logs with severity level 0 to 7.
Sets the amount of logs that can be shown in the console in asecond.
By default, the severity level is error (3). The rate of the log

exceptwhose severity level is less than or equal to error (3) is notcontrolled.

severity

Defaults

CommandMode

Log severity level in the range from 0 to 7. The lower the levelis, the higher the severity is.

The log rate limit function is disabled by default.

Global configuration mode

Usage Guide

Use this command to control the syslog outpt to prevent the massive log output.

Configuration

The following example sets the number of the logs (including debug) that can be processed in a

Examplessecond as 10. However, the logs with warning or higher severity level are not controlled:
Ruijie(config)#logging rate-limit all 10 except warnings

RelatedCommand

Description

Commands

show logging countDisplays log information about modules of the system.

show logging

Platform
Description

Displays basic configuration of log modules and log
information in the buffer.

N/A

7.18 logging server
Use this command to send the logs to the specified Syslog Sever in global configuration mode. Use theno form of this command to remove the setting. Use the default form of this command to restore thedefault setting.
logging server { ip-address | ipv6 ipv6-address } [ udp-prot port ]no logging server { ip-address| ipv6 ipv6-address }no logging server { ip-address | ipv6 ipv6-address } udp-prot
Parameter

Parameter

Description

7-16

Command Reference

Description

ip-address

IP address of the host that receives log information.

ipv6-address

Specifies IPv6 address for the host receiving the logs.

udp-port port

Defaults

CommandMode

Usage Guide

Syslog Commands

Specifies the port number for the specified host (The default
port number is 514).

No log is sent to any syslog server by default.

Global configuration modeThis command specifies a Syslog server to receive the logs of the device. Users are allowed toconfigure up to 5 Syslog Servers. The log information will be sent to all the configured Syslog Servers
at the same time.

Configuration

The following example specifies a syslog server of the address 202.101.11.1:

ExamplesRuijie(config)# logging server 202.101.11.1
The following example specifies an ipv6 address as 2001::1:
Ruijie(config)# logging server ipv6 2001::1

RelatedCommand

Description

Commands

logging on

Turns on the log switch.

show logging
logging trap

Platform
Description

Displays log messages and related log configuration
parameters in the buffer.
Sets the level of logs allowed to be sent to Syslog server.

N/A

7.19 logging source interface
Use this command to configure the source interface of logs in global configuration mode. Use the noform of this command to restore the default setting.
logging source [ interface ] interface-type interface-number
no logging source [ interface ]Parameter
Description

Parameter

Description

interface-type

Interface type.

interface-number

Interface number.

Defaults

No source interface is configured by default.

Command

Global configuration mode

7-17

Command Reference

Syslog Commands

Mode

Usage Guide

By default, the source address of the log messages sent to the syslog server is the address of thesending interface. For easy tracing and management, this command can be used to fix the source
address of all log messages as an interface address, so that the administrator can identify which
device is sending the message through the unique addresses. If the source interface is notconfigured on the device, or no IP address is configured for the source interface, the source addressof the log messages is the address of the sending interface.

Configuration

The following example specifies loopback 0 as the source address of the syslog messages:

ExamplesRuijie(config)# logging source interface loopback 0

RelatedCommand

Description

Commands

logging server

Sends logs to the Syslog server.

Platform
Description

N/A

7.20 logging source ip | ipv6
Use this command to configure the source IP address of logs in global configuration mode. Use the noform of this command to restore the default setting.
logging source {ip ip-address | ipv6 ipv6-address}
no logging source { ip | ipv6 }Parameter
Description

Parameter
ip-address

ipv6-address

Defaults

CommandMode

Usage Guide

Description
Specifies the source IPv4 address sending the logs to IPv4log server.
Specifies the source IPv6 address sending the logs to IPv6
log server.

No source address is configured by default.

Global configuration mode

By default, the source address of the log messages sent to the syslog server is the address of thesending interface. For easy tracing and management, this command can be used to fix the source
address of all log messages as an address, so that the administrator can identify which device issending the message through the unique addresses. If this IP address is not configured on thedevice, the source address of the log messages is the address of the sending interface.

7-18

Command Reference

Syslog Commands

Configuration

The following example specifies 192.168.1.1 as the source address of the syslog messages:

ExamplesRuijie(config)# logging source ip 192.168.1.1

RelatedCommand

Description

Commands

logging server

Sends the logs to the Syslog server.

Platform
Description

N/A

7.21 logging synchronous
Use this command to enable synchronization function between user input and log output in line
configuration mode to prevent interruption when the user is keying in characters. Use the no form of
this command to restore the default setting.
logging synchronous
no logging synchronous
Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

The synchronization function between user input and log output is disabled by default.

Line configuration modeThis command enables synchronization function between user input and log output, preventing theuser from interrupting when keying in the characters.

Configuration

Ruijie(config)#line console 0

ExamplesRuijie(config-line)#logging synchronous
Print UP-DOWN logs on the port when keying in the command, the input command will be output
again:
Ruijie# configure terminal
Oct 9 23:40:55 %LINK-5-CHANGED: Interface GigabitEthernet 0/17, changed state
to down
Oct 9 23:40:55 %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet 0/17, changed state to DOWN
Ruijie# configure terminal//----the input command by the user is output

again rather than being intererupted.

RelatedCommand

Description

Commands

show running-config

Displays the configuration.

7-19

Command Reference

Platform
Description

Syslog Commands

N/A

7.22 logging trap
Use this command to set the severity of logs that are allowed to be sent to the syslog server in global
configuration mode. Use the no form of this command to prohibit sending log messages to the Syslog
server.
logging trap [level]
no logging trap
Parameter
Description

Defaults

CommandMode

Usage Guide

Parameterlevel

Description
Severity of the log message. The name of the severity or thenumeral can be used. For the details of log severity, see Table 1.

The default is informational(6)Global configuration mode

To send logs to the Syslog Server, run the logging command in global configuration mode toconfigure the Syslog Server. Then, run the logging trap command to specify the severity level oflogs to be sent.
The show logging command displays the configured related parameters and statistics of the log.

Configuration

The following example enables logs at severity 6 to be sent to the Syslog Server with the address of

Examples

202.101.11.22:
Ruijie(config)# logging 202.101.11.22
Ruijie(config)# logging trap informational

RelatedCommand

Description

Commands

logging on

Turns on the log switch.

logging

Sends logs to the Syslog server.

show logging

Platform
Description

Displays the log messages and related log configuration
parameters in the buffer.

N/A

7-20

Command Reference

Syslog Commands

7.23 logging userinfo
Use this command to enable the logging function to record user log/exit. Use the no form of thiscommand to restore the default setting.
logging userinfo
no logging userinfo

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

No log message is printed recording user log/exit by default.

Command

Global configuration mode

Mode

Usage Guide

This command is used to print the log message to remind the administrator of user login. The log
message is in the format as follows:
Mar 22 14:05:45 %LOGIN-5-LOGIN_SUCCESS: User login from vty0 (192.168.23.68)
OK.

Configuration

The following example enables the logging function to record user log/exit.

ExamplesRuijie(config)# logging userinfo

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.24 logging userinfo command-log
Use this command to enable the logging function to record user operation. Use the no form of thiscommand to restore the default setting.
logging userinfo command-log
no logging userinfo command-log

Parameter
Description

Defaults

Parameter

Description

N/A

N/A

No log message is printed recording user operation by default.

7-21

Command Reference

Command

Syslog Commands

Global configuration mode

Mode

Usage Guide

This command is used to print the log message to remind the administrator of configuration change.
The log message is in the format as follows:
Mar 22 14:10:40 %CLI-5-EXEC_CMD: Configured from vty0 (192.168.23.68)
command-log: logging server 192.168.23.68.

Configuration

The following example enables the logging function to record user operation.

ExamplesRuijie(config)# logging userinfo command-log

RelatedCommands

Platform

Command

Description

N/A

N/A

N/A

Description

7.25 service log-format rfc5424
Use this command to enable the RFC5424 format. Use the no form of this command to restore thedefault setting.
service log-format rfc5424
no service log-format rfc5424

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

The RFC3164 format is used by default.

Command

Global configuration mode

Mode

Usage Guide

After the RFC5424 format is enabled, the service sequence-numbers, service sysname, service
timestamps, service private-syslog and service standard-syslog commands become invalid andhidden.
After switching back to the RFC3164 format, the logging delay-send, logging policy and logging
statistic commands become invalid and hidden.
After switching the log format, the results of running the show logging and show logging config
commands change,

Configuration

The following example enables the RFC5424 format.

7-22

Command Reference

ExamplesRelatedCommands

Platform
Description

Syslog Commands

Ruijie(config)# service log-format rfc5424

Command

Description

N/A

N/A

N/A

7.26 show logging
Use this command to display configured parameters and statistics of logs and log messages in thememory buffer at privileged user layer. The log messages are sorted by the timestamp from before tonow.
show logging
Parameter

Parameter

Description

Description

N/A

N/A

Defaults

N/A

CommandMode

Privileged EXEC mode

Usage Guide

N/A

Configuration

The following command displays the result of the show logging command with RFC5424 format

Examplesdisabled.
Ruijie# show logging
Syslog logging: enabled
Console logging: level debugging, 15495 messages logged
Monitor logging: level debugging, 0 messages logged
Buffer logging: level debugging, 15496 messages loggedStandard format: false
Timestamp debug messages: datetime
Timestamp log messages: datetime
Sequence-number log messages: enable
Sysname log messages: enable
Count log messages: enable
Trap logging: level informational, 15242 message lines logged,0 faillogging to 202.101.11.22
logging to 192.168.200.112

7-23

Command Reference

Syslog Commands

Log Buffer (Total 131072 Bytes): have written 1336,
015487: *Sep 19 02:46:13: Ruijie %LINK-3-UPDOWN: Interface FastEthernet 0/24,
changed state to up.
015488: *Sep 19 02:46:13: Ruijie %LINEPROTO-5-UPDOWN: Line protocol on
Interface FastEthernet 0/24, changed state to up.
015489: *Sep 19 02:46:26: Ruijie %LINK-3-UPDOWN: Interface FastEthernet 0/24,
changed state to down.
015490: *Sep 19 02:46:26: Ruijie %LINEPROTON/A5N/AUPDOWN: Line protocol on
Interface FastEthernet 0/24, changed state to down.
015491: *Sep 19 02:46:28: Ruijie %LINKN/A3N/AUPDOWN: Interface FastEthernet
0/24, changed state to up.
015492: *Sep 19 02:46:28: Ruijie %LINEPROTO-5-UPDOWN: Line protocol on
Interface FastEthernet 0/24, changed state to up.
Log information description:
Field

Description

Syslog logging

Logging flag: enabled or disabled

Console logging

Monitor logging

Buffer logging

Level of the logs printed on the console, andstatistics
Level of the logs printed on the VTY window,
and statistics
Level of the logs recorded in the memory
buffer, and statistics.

Standard format

Standard log format.

Timestamp debug messages

Timestamp format of the Debug messages

Timestamp log messages

Timestamp format of the Log messages

Sequence-number log
messages

Serial number switch

Sequence log messages

Attaches system names to the logs.

Count log messages

Log statistics function

Trap logging
Log Buffer

Level of the logs sent to the syslog server,and statistics
Log files recorded in the memory buffer

The following example displays the result of the show logging command with RFC5424 format
enabled.
Ruijie# show logging
Syslog logging: enabled
Console logging: level debugging, 4740 messages logged
Monitor logging: level debugging, 0 messages logged
Buffer logging: level debugging, 4745 messages logged

7-24

Command Reference

Syslog Commands

Statistic log messages: disable
Statistic log messages to terminal: disable
Delay-send file name:syslog_ftp_server, Current write index:3, Current send
index:3, Cycle:10 seconds
Count log messages: enable
Trap logging: level informational, 2641 message lines logged,4155 faillogging to 192.168.23.89
logging to 2000::1
Delay-send logging: 2641 message lines logged
logging to 192.168.23.89 by tftp
Log Buffer (Total 4096 Bytes): have written 4096, Overwritten 3292
<135>1 2013-07-24T12:19:33.130290Z ruijie - 7 - - Please config the IP addressfor capwap.
<132>1 2013-07-24T12:20:02.80313Z ruijie CAPWAP 4 NO_IP_ADDR - No ip addressfor capwap.
<135>1 2013-07-24T12:20:02.80343Z ruijie - 7 - - Please config the IP addressfor capwap.
<132>1 2013-07-24T12:20:32.250265Z ruijie CAPWAP 4 NO_IP_ADDR - No ip addressfor capwap.
<134>1 2013-07-24T12:29:33.410123Z ruijie SYS 6 SHELL_LOGIN [USER@4881
name="" type="" from="console"] user login success.

<134>1 2013-07-24T12:29:34.343763Z ruijie SYS 6 SHELL_CMD[USER@4881 name=""][CMD@4881 task="rl_con" cmd="enable"]
Field

Description

Syslog logging

Logging flag: enabled or disabled

Console logging

Level of the logs printed on the console, and statistics

Monitor logging

Buffer logging

Level of the logs printed on the VTY window, andstatistics
Level of the logs recorded in the memory buffer, andstatistics.

Count log messages

Log statistics function

Statistic log messages

Enables/disables log sending periodically

Statistic log messages to terminal

Delay-send file nameEnables/ disables log sending to console and remoteterminal
Local filename of log delay-sending cache, index ofwrite file and delay interval

Trap logging

Level of the logs sent to the syslog server and statistics

Delay-send logging

The server address, log sending mode and statistics

Log Buffer

Log files recorded in the memory buffer

RelatedCommandFunction

Commands

logging on

Turns on the log switch.

clear logging

Clears the log messages in the buffer.

7-25

Command Reference

Platform
Description

Syslog Commands

N/A

7.27 show logging config
Use this command to display log configuration and statistics.
show logging config

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

N/A

Configuration

The following example displays the outcome of running the show logging config command with

ExamplesRFC5424 disabled.
Ruijie# show logging config
Syslog logging: enabled
Console logging: level debugging, 15495 messages logged
Monitor logging: level debugging, 0 messages logged
Buffer logging: level debugging, 15496 messages loggedStandard format: false
Timestamp debug messages: datetime
Timestamp log messages: datetime
Sequence-number log messages: enable
Sysname log messages: enable
Count log messages: enable
Trap logging: level informational, 15242 message lines logged,0 faillogging to 202.101.11.22

logging to 192.168.200.112
Field

Description

Syslog logging

Whether the logging function is enabled or disabled.

Console logging

Monitor logging

Buffer logging

The level and statistics of the log message printed on
the console.
The level and statistics of the log message printed on
the VTY window.
The level and statistics of the log message recorded in
the memory buffer.

7-26

Command Reference

Syslog Commands

Standard format

Standard log format.

Timestamp debug messages

Timestamp format of debugging message.

Timestamp log messages

Timestamp format of log message.

Sequence-number log messages

Whether the sequence number function is enabled or
disabled.

Sysname log messages

Adds the system name to the log message.

Count log messages

Log-counting function

Trap logging

The level and statistics of the log message sent to thesyslog server.

The following example displays the outcome of running the show logging config command with
RFC5424 enabled.
Ruijie# show logging
Syslog logging: enabled
Console logging: level debugging, 4740 messages logged
Monitor logging: level debugging, 0 messages logged
Buffer logging: level debugging, 4745 messages logged
Statistic log messages: disable
Statistic log messages to terminal: disable
Delay-send file name:syslog_ftp_server, Current write index:3, Current send
index:3, Cycle:10 seconds
Count log messages: enable
Trap logging: level informational, 2641 message lines logged,4155 faillogging to 192.168.23.89
logging to 2000::1
Delay-send logging: 2641 message lines logged

logging to 192.168.23.89 by tftp
Field

Description

Syslog logging

Logging flag: enabled or disabled

Console logging

Level of the logs printed on the console, and statistics

Monitor logging

Buffer logging

statistics
Level of the logs recorded in the memory buffer, andstatistics.

Count log messages

Log statistics function

Statistic log messages

Enables/disables log sending periodically

Statistic log messages to terminal

Delay-send file name

RelatedLevel of the logs printed on the VTY window, andEnables/ disables log sending to output console andremove terminal
Local filename of log delay-sending cache, index ofwrite file and delay interval

Trap logging

Level of the logs sent to the syslog server and statistics

Delay-send logging

The server address, log sending way and statistics

Command

Description

7-27

Command Reference

Syslog Commands

Commands
N/A

Platform

N/A

N/A

Description

7.28 show logging countUse this command to display the statistics about occurrence times, and the last occurrence time ofeach module log in the system in privileged mode.
show logging countParameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

N/A

Privileged EXEC mode

To use the log packet statistics function, run the logging count command in global configuration
mode. The show logging count command can show the information of a specific log, occurrence
times, and the last occurrence time.
You can use the show logging command to check whether the log statistics function is enabled.

Configuration

The following example displays the result of the show logging count command:

ExamplesRuijie# show logging count
Module NameSYS
SYS TOTAL

Message Name Sev Occur
CONFIG_I

51

Last Time
Jul 6 10:29:57

1

RelatedCommandFunction

Commands

logging count

Enables the log statistics function.
Displays basic configuration of log modules andshow logging

log information in the buffer.
Clears the logs in the buffer.

clear logging

Platform
Description

N/A

7-28

Command Reference

Syslog Commands

7.29 show logging reverse
Use this command to display configured parameters and statistics of logs and log messages in thememory buffer at privileged user layer. The log messages are sorted by the timestamp from now to
before.
show logging reverse

Parameter
Description

Parameter

Description

N/A

N/A

Defaults

N/A

CommandPrivileged EXEC mode

Mode

Usage Guide

Configuration

The following command displays the result of the show logging reverse command with RFC5424

Examplesformat disabled.
Ruijie#show logging reverse
Syslog logging: disabled
Console logging: level debugging, 14 messages logged
Monitor logging: level informational, 0 messages logged
Buffer logging: level debugging, 15 messages logged
File logging: level informational, 15 messages logged
File name:syslog.txt, size 128 Kbytes, have written 1 files
Statistic log messages: disable
Statistic log messages to terminal: disable
Delay-send log messages to terminal: disable
Delay-send file name:syslog_ftp_server, Current write index:0, Current send
index:0, Cycle:3600 seconds
Count log messages: disable
Trap logging: level informational, 15 message lines logged,0 faillogging to 202.101.11.1
logging to 202.101.11.22
logging to 2001::1
Delay-send logging: 0 message lines logged
Log Buffer (Total 131072 Bytes): have written 1413,*Jan 1 00:20:31: %SYSLOG-6-DEBUG_PRINT: The debug print time 20 minutes has
expired!
*Jan 1 00:14:19: %SYS-5-CONFIG_I: Configured from console by console*Jan 1 00:01:52: %DHCP_CLIENT-6-ADDRESS_ASSIGN: Interface VLAN 1 assigned
DHCP address 10.52.24.158, mask 255.255.248.0.

7-29

Command Reference

Syslog Commands*Jan 1 00:01:44: %ARP-4-DUPADDR: Duplicate address 192.168.1.200 on interface
VLAN 1 port GigabitEthernet 0/18, sourced by 8005.8800.8249.
*Jan 1 00:01:44: %LINEPROTO-5-UPDOWN: Line protocol on Interface VLAN 1,changed state to up.
*Jan 1 00:01:42: %LLDP-4-CREATEREM: Port GigabitEthernet 0/18 created one newneighbor, Chassis ID is 7401.9000.0000, Port ID is Gi0/5.
*Jan 1 00:01:42: %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet 0/18, changed state to up.
*Jan 1 00:01:42: %LINK-3-UPDOWN: Interface GigabitEthernet 0/18, changed
state to up.
*Jan 1 00:00:39: %DEV_MONITOR-6-DEVICE_INIT: master role init.
*Jan 1 00:00:32: %SYSMON-5-WARMSTART: System warmstart.
*Jan 1 00:00:32: %DEV_MONITOR-5-CARD_POWER_ON: The power enough, card in slot
0 will be controlled to power on automatically.
*Jan 1 00:00:30: %DP-5-PROB: Board probing has completed.
*Jan 1 00:00:29: %DP-6-MASTER: Module in slot 0 has translated to master.
*Jan 1 00:00:29: %SWITCH-6-INSTALL: Install chassis RG-HS2310-16GH2GT1XS on
switch 1*Jan 1 00:00:27: %LOCAL_DP-5-LC_PROB: Board information in this chassis has
been collected.
Field

Description

Syslog logging

Logging flag: enabled or disabled

Console logging

Monitor logging

Buffer logging

Level of the logs printed on the console, andstatistics
Level of the logs printed on the VTY window,
and statistics
Level of the logs recorded in the memory
buffer, and statistics.

Standard format

Standard log format.

Timestamp debug messages

Timestamp format of the Debug messages

Timestamp log messages

Timestamp format of the Log messages

Sequence-number log
messages

Serial number switch

Sequence log messages

Attaches system names to the logs.

Count log messages

Log statistics function

Trap logging
Log Buffer

Level of the logs sent to the syslog server,and statistics
Log files recorded in the memory buffer

The following example displays the result of the show logging reverse command with RFC5424

7-30

Command Reference

Syslog Commands

format enabled.
Ruijie#show logging reverse
Syslog logging: disabled
Console logging: level debugging, 14 messages logged
Monitor logging: level informational, 0 messages logged
Buffer logging: level debugging, 15 messages logged
File logging: level informational, 15 messages logged
File name:syslog.txt, size 128 Kbytes, have written 1 files
Statistic log messages: disable
Statistic log messages to terminal: disable
Delay-send log messages to terminal: disable
Delay-send file name:syslog_ftp_server, Current write index:0, Current send
index:0, Cycle:3600 seconds
Count log messages: disable
Trap logging: level informational, 15 message lines logged,0 faillogging to 202.101.11.1
logging to 202.101.11.22
logging to 2001::1
Delay-send logging: 0 message lines logged
Log Buffer (Total 131072 Bytes): have written 1413,*Jan 1 00:20:31: %SYSLOG-6-DEBUG_PRINT: The debug print time 20 minutes has
expired!
*Jan 1 00:14:19: %SYS-5-CONFIG_I: Configured from console by console*Jan 1 00:01:52: %DHCP_CLIENT-6-ADDRESS_ASSIGN: Interface VLAN 1 assigned
DHCP address 10.52.24.158, mask 255.255.248.0.
*Jan 1 00:01:44: %ARP-4-DUPADDR: Duplicate address 192.168.1.200 on interface
VLAN 1 port GigabitEthernet 0/18, sourced by 8005.8800.8249.
*Jan 1 00:01:44: %LINEPROTO-5-UPDOWN: Line protocol on Interface VLAN 1,changed state to up.
*Jan 1 00:01:42: %LLDP-4-CREATEREM: Port GigabitEthernet 0/18 created one newneighbor, Chassis ID is 7401.9000.0000, Port ID is Gi0/5.
*Jan 1 00:01:42: %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet 0/18, changed state to up.
*Jan 1 00:01:42: %LINK-3-UPDOWN: Interface GigabitEthernet 0/18, changed
state to up.
*Jan 1 00:00:39: %DEV_MONITOR-6-DEVICE_INIT: master role init.
*Jan 1 00:00:32: %SYSMON-5-WARMSTART: System warmstart.
*Jan 1 00:00:32: %DEV_MONITOR-5-CARD_POWER_ON: The power enough, card in slot
0 will be controlled to power on automatically.
*Jan 1 00:00:30: %DP-5-PROB: Board probing has completed.
*Jan 1 00:00:29: %DP-6-MASTER: Module in slot 0 has translated to master.
*Jan 1 00:00:29: %SWITCH-6-INSTALL: Install chassis RG-HS2310-16GH2GT1XS on
switch 1*Jan 1 00:00:27: %LOCAL_DP-5-LC_PROB: Board information in this chassis has

7-31

Command Reference

Syslog Commands

been collected.
Field

Description

Syslog logging

Logging flag: enabled or disabled

Console logging

Level of the logs printed on the console, and statistics

Monitor logging

Buffer logging

Platform
Description

Level of the logs recorded in the memory buffer, andstatistics.
Log statistics function

Statistic log messages

Enables/disables log sending periodically

Delay-send file nameCommands

statistics

Count log messages

Statistic log messages to terminal

RelatedLevel of the logs printed on the VTY window, andEnables/ disables log sending to console and remoteterminal
Local filename of log delay-sending cache, index ofwrite file and delay interval

Trap logging

Level of the logs sent to the syslog server and statistics

Delay-send logging

The server address, log sending mode and statistics

Log Buffer

Log files recorded in the memory buffer

Command

Description

N/A

N/A

N/A

7.30 terminal monitor
Use this command to show logs on the current VTY window. Use the no form of this command torestore the default setting.
terminal monitor
terminal no monitor
Parameter
Description

Defaults

CommandMode

Usage Guide

Parameter

Description

N/A

N/A

Log information is not allowed to be displayed on the VTY window by default.

Privileged EXEC modeThis command only sets the temporary attributes of the current VTY. As the temporary attribute, it is7-32

Command Reference

Syslog Commands

not stored permanently. At the end of the VTY terminal session, the system will use the default
setting, and the temporary setting is invalid. This command can be also executed on the console, but
it does not take effect.

Configuration

The following example allows log information to be printed on the current VTY window:

ExamplesRuijie# terminal monitor

RelatedCommand

Description

Commands

N/A

N/A

Platform
Description

N/A

Command

VersionDescription

History

N/A

N/A

7-33

Command Reference

Monitoring Commands

8 Monitoring Commands
8.1 show power
Use this command to display power information including that of its basic condition, redundancy,
allocation and version and etc.
show power

Parameter
Description

CommandParameter

Description

N/A

N/A

Privileged EXEC mode

Mode

Level

14

Usage Guide

This command is used to display power information

Configuration
ExamplesPromptMessages

Platforms

N/A

N/A

N/A

8.2 show temperature
Use this command to display board temperature, threshold configuration and other information.
show temperature

Parameter
Description

CommandParameter

Description

N/A

N/A

Privileged EXEC mode

Mode

Level

14

8-1

Command Reference

Usage Guide

Monitoring Commands

Use the command to display the current temperature and threshold configuration of each board.
The temperature threshold of CA products involves the alarm threshold and the hazard threshold.
Alarm threshold: When the temperature of the board exceeds the alarm threshold, the active supervisor
module generates a Syslog message and the Alarm LED on the panel becomes yellow.
Hazard threshold: It indicates the power-off temperature. When the temperature of the board exceeds
the hazard threshold, the board powers off automatically. In addition, the active supervisor module
generates a Syslog message and the Alarm LED on the panel becomes red.

Configuration

The following example displays the temperature and threshold configuration of all boards of S29XS.

ExamplesRuijie(config)#show temperature
Slot

Card_type

Temp_nameCurrent(C) Status------- -------------------------------- ------------------------ -----------------0

RG-HS2310-16GH2GT1XS

fan_out

N/A

ghn_inlet

N/A

air_inlet

N/A

critical
RG-HS2310-16GH2GT1XS
critical
RG-HS2310-16GH2GT1XS
criticalRuijie(config)#

PromptMessages

Platforms

N/A

N/A

8.3 show fan
Use this command to display fan status or speed.
show fanParameter
Description

CommandParameter

Description

N/A

N/A

Privileged EXEC mode

Mode

Level

NA

8-2

Command Reference

Usage Guide

Monitoring Commands

Run this command to view the current fan status and speed of each board.
CA fan thresholds include alarm thresholds and hazard thresholds.
Alarm threshold: When the speed of a single fan on a board is lower than the alarm threshold, the active
monitoring module generates a syslog alarm, and the alarm indicator and status indicator on the panel
keep on.
Danger threshold: When all fan speeds are lower than the alarm threshold, the active monitoring module
generates a syslog alarm, the alarm indicator on the panel keeps on, and the status indicator is off.

Configuration

The following example displays the fan status.

ExamplesRuijie#show fan
Fan-id Status------ ---------1

ok

2

ok

Ruijie#
The following example displays the fan speed.
Ruijie#show fan speed
Fan-id Status

Speed(R/m) Speed-level------ ---------- ---------- ----------1

ok

7800

1

2

ok

7680

1

Ruijie#PromptMessages

Platforms

N/A

N/A

8-3