Commands I used while configuring a Ruijie Switch

I have recently experienced a switch which is called a Ruijie made in China. I’m not good at Cisco, but briefly, I can say that Ruijie commands are similar to Cisco. You can visit its webpage by clicking here.

Anyway I just wanted to share the commands that I use commonly to configure a Ruijie switch in this post.

Run the enable command that gives you to enter privileged mode. You can use this command mode to conduct basic tests or display system information.


After you run the enable mode that allows you to enter the privileged mode, then run the configure command to enter global configuration mode.

configure terminal

The default host name is Ruijie. Run the hostname command to change the default system name.

hostname <NewHostName>

See the configs which is currently runs on the switch.

show running-config

In global configuration mode, run the interface command to enter interface configuration mode. It allows you to configure an interface or interfaces.


Seeing more commands about the interface, don’t forget to add a question mark after you typing the interface. There is no need to use only a question mark after the interface, you can use it everywhere to see what to do.

interface ?

You don’t need to write the all commands in a row, just start to text and press the Tab key to display the complete keyword.

SW# show run<Tab>
SW# show running-config

Assigning an ip address to the switch. Firstly of all you should enter the global configuration mode. All ports are belong to VLAN 1. It comes out of the factory as default like other manufacturers did.

SW1(config)# Interface VLAN 1
SW1(config-VLAN 1)# ip address
SW1(config-VLAN 1)# exit

Accessing your Ruijie switch via your web browser. Ruijie needs to have an enabled web server service before you set an ip address or after. In the global configuration mode, type the command given below. It grants both http and https traffics to your swich.

enable service web-server all

Connecting your Ruijie switch via telnet. Run the following command to enable the telnet command in the global configuration mode.

enable service telnet-server

Accessing your Ruijie switch via telnet or console are not enough to connect your device with the command which was given above. You have to use the following commands below, they help you to set a password for both privileged mode and global configuration mode.

username admin secret Passw0rd
enable secret Passw0rd
line vty 0 4
login local

Creating a new vlan also is so simple, just text VLAN ID command in the global configuration mode.

SW1(config)# VLAN 50
SW1(config)# name Camera
SW1(config)# exit

Assigning a specific port or ports to a VLAN that was created for the Camera System. Following commands assing the first 10 ports of the switch to VLAN 50.

SW1(config)#interface range gigabitEthernet 0/1-10
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 50

Seeing the status of all the ports

show interface status

Seeing the mac address of the devices which is connected to gigabit ethernet ports of the switch.

show mac-address-table | exclude TenGigabitEthernet

or all.

show mac-address-table

Seeing the aggregate ports and, how to configure aggregate ports examples are shown below.

SW45#show aggregatePort summary
AggregatePort MaxPorts SwitchPort Mode   Load balance                 Ports
------------- -------- ---------- ------ ---------------------------- -----------------------------------
Ag1           8        Enabled    ACCESS src-mac                      Gi0/32  ,Gi0/33  ,Gi0/38  ,Gi0/39
Ag2           8        Enabled    ACCESS src-mac                      Gi0/24  ,Gi0/25  ,Gi0/27  ,Gi0/29
SW45(config)#interface aggregatePort 3
SW45(config-if-AggregatePort 3)#switchport access vlan 100
SW45(config-if-AggregatePort 3)#exit

SW45(config)#interface range gigabitEthernet 0/1-4
SW45(config-if-range)#port-group 3 mode active

Building configuration...


AggregatePort MaxPorts SwitchPort Mode   Load balance                 Ports
------------- -------- ---------- ------ ---------------------------- -----------------------------------
Ag1           8        Enabled    ACCESS src-mac                      Gi0/32  ,Gi0/33  ,Gi0/38  ,Gi0/39
Ag2           8        Enabled    ACCESS src-mac                      Gi0/24  ,Gi0/25  ,Gi0/27  ,Gi0/29
Ag3           8        Enabled    ACCESS src-mac                      Gi0/1   ,Gi0/2   ,Gi0/3   ,Gi0/4

If you want to know which port is used by your device can be found by using the following command.

sh mac-address-table dynamic address aaaa.bbbb.cccc.dddd

Sometimes LLDP command helps you to find out other network devices (switch, IP phone, etc. ). LLDP also helps you to assign the VLANs automatically to IP phones for IP Phone networks. Simply you can find these devices using the following command.

show lldp neighbors

Deploying the VLANs to all network enable the gvrp feature on the all switches.

gvrp enable
gvrp dynamic-vlan-creation enable

Shutting down or powering up an interface or poe can be done for the interface gigabitEthernet 0/1 with the following command.

no shutdown

poe enable
no poe enable

PBR example of the Ruijie is shown below.

route-map PRODUCTIONout permit 11
 match ip address 110
 set ip next-hop
route-map PRODUCTIONout permit 2699
 match ip address 2699
 set ip next-hop

route-map ITout permit 16
 match ip address 115
 set ip next-hop
route-map ITout permit 2699
 match ip address 2699
 set ip next-hop
ip access-list extended 110
 10 permit ip any
ip access-list extended 115
 10 permit ip any
ip access-list extended 2699
 10 permit ip any any
vlan 106
vlan 110
 name IT
interface VLAN 106
 ip address
 ip policy route-map PRODUCTIONout
 ip helper-address
interface VLAN 110
 ip address
 ip policy route-map ITout
 ip helper-address

I will try to add this post more when i start to collect new information about Ruijie.

Have a great day.


Published by Hasan Altin

I don't see any difference between the one who doesn't share its knowledge or the one who doesn't share its bread.

4 comments on “Commands I used while configuring a Ruijie Switch”

  1. Thank you for information about the base command on the switch. I would like to enabe the Network Access Security (NAC) on this brand of switch. May I know if you have experience on configure the switch port and aaa authentication ?

    1. Hello Hong, thanks for your time reading my post. In the future days, I have the plan to implement aaa authentication on the Ruijie switches, but I just write something on this blog that I have experienced while working. I will keep this post up when I try to finish implementing aaa authentication. I recommend you follow this link ( on the official Ruijie network website. There are some examples of your question. I hope it helps you to figure out how to do.

      Have a great day,

    1. Hello Kamal,

      Sorry for the late reply. As far as I know that switch is Rejee which is managed by cloud and telnet option may not be available and you are not allowed to use cli commands. Please use web interface instead.

      Have a great day.

Leave a Reply

Your email address will not be published. Required fields are marked *