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.

enable

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 hostname is Ruijie. Run the hostname command to change the default system name.

hostname <NewHostName>

See the configs which is currently running 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.

interface

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. First 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 172.16.16.2 255.255.255.0
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 or the SSH command in the global configuration mode.

enable service telnet-server
enable service ssh-server

Accessing your Ruijie switch via telnet or console is not enough to connect your device with the command that 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 the 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. The following commands assign 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
SW1(config-if-range)#exit

Seeing the status of all the ports

show interface status

Seeing the mac address of the devices connected to the switch’s gigabit ethernet ports.

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#
SW45(config)#interface aggregatePort 3
SW45(config-if-AggregatePort 3)#switchport access vlan 100
SW45(config-if-AggregatePort 3)#exit
SW45(config)#wr


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

Building configuration...

[OK]
SW45#

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, the LLDP command helps you to find 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 networks enables the gvrp feature on 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.

shutdown
no shutdown

poe enable
no poe enable

Enabling loop protection is easy on Ruijie. There is an example below and it shows you that you can enable port protection on gigabit ports and let other devices that there is a loop on your switch using your uplink SFP+ ports. If the switch detects a loop it will block the port/ports for 5 minutes then it will keep doing the same till the problem resolves.

SW45(config)#rldp enable
SW45(config)#interface range gigabitEthernet 0/1-24
SW45(config-if-range)#rldp port loop-detect shutdown-port
exit
SW45(config)#interface range TenGigabitEthernet 0/25-26
SW45(config-if-range)#rldp port loop-detect warning
exit
SW45(config)#errdisable recovery interval 300

PBR example of the Ruijie is shown below.

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

route-map ITout permit 16
 match ip address 115
 set ip next-hop 192.168.44.2
!
route-map ITout permit 2699
 match ip address 2699
 set ip next-hop 192.168.44.1
!
ip access-list extended 110
 10 permit ip any 192.168.32.0 0.0.0.255
!
ip access-list extended 115
 10 permit ip any 192.168.40.0 0.0.0.255
!
ip access-list extended 2699
 10 permit ip any any
!
vlan 106
 name PRODUCTION
!
vlan 110
 name IT
!
interface VLAN 106
 ip address 192.168.40.2 255.255.255.0
 ip policy route-map PRODUCTIONout
 ip helper-address 192.168.1.249
!
interface VLAN 110
 ip address 192.168.44.2 255.255.255.0
 ip policy route-map ITout
 ip helper-address 192.168.1.249

Clearing the config of the switch is easy. Following the commands help you clear the configuration.

SW45#delete config.text

SW45#reload

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

Have a great day.

Hasan

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”

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 ?

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 (https://www.ruijienetworks.com/support/documents/slide_75864-75866) 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,
Hasan

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.
Hasan

Leave a Reply

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