GTAC-Sophia Publish time 2023-5-15 10:02:36

How to configure static routes on Ruijie Switch?

Introduction of static routing
Static routes are manually configured so that the packets can be sent to the specified destination network go through the specified route.Static routes can be very important if the switch don't support dynamic routing protocol (RIP,OSPFetc.) and are useful for specifying a gateway of last resort to which all unrouteable packets are sent.
Applied scenarios
Static routing is mainly used in small networks, where the number of devices in a three-layer switch or router network is limited, the total number of network routes is limited, and the maintenance workload is manageable, so static routing can be considered; or the network equipment does not support some dynamic routing protocols such as RIP, OSPF, can only use static routing.
Case of configuration
a) Requirement
Configure the switch with static routes and ensure that users in network 1 can communicate with users in network 2
b) Topology:
data/attachment/forum/202305/15/095920kdjjrkpgy8a1aupz.pngConfiguration Tips
1) Assign IP addresses to SW1 and SW2
2) Configure Static Routes on SW1
3) Configure Static Routes on SW2
4) Save Configuration
c)Configuration
RGOS Configuration:
1) Assign IP address to SW1

Ruijie>enable               Ruijie#configure terminal   Ruijie(config)#interface fastethernet 0/1Ruijie(config-if-FastEthernet 0/1)#no switchportRuijie(config-if-FastEthernet 0/1)#ip address192.168.1.254 255.255.255.0Ruijie(config-if-FastEthernet 0/1)#interfaceGigabitEthernet 0/25Ruijie(config-if-GigabitEthernet 0/25)#noswitchportRuijie(config-if-GigabitEthernet 0/25)#ip address192.168.3.1 255.255.255.0Ruijie(config-if-GigabitEthernet 0/25)#exit

2) Assign IP address to SW2

Ruijie>enable               Ruijie#configure terminal   Ruijie(config)#interface fastethernet 0/1Ruijie(config-if-FastEthernet 0/1)#no switchportRuijie(config-if-FastEthernet 0/1)#ip address 192.168.2.254255.255.255.0Ruijie(config-if-FastEthernet 0/1)#interfaceGigabitEthernet 0/25Ruijie(config-if-GigabitEthernet 0/25)#noswitchportRuijie(config-if-GigabitEthernet 0/25)#ip address192.168.3.2 255.255.255.0Ruijie(config-if-GigabitEthernet 0/25)#exit

3) Configure Static Route on SW1
Ruijie(config)#ip route 192.168.2.0 255.255.255.0192.168.3.2//configure static routes to destination subnet 192.168.2.0/24 and next hop is 192.168.3.2
Note:
1) When you configure static routes, there're two ways to specify the next hop. You can specify an IP address, or you can specify a local outgoing interface.
2) We suggest you use IP address as next hop
4) Configure Static Routes on SW2
Ruijie(config)#ip route 192.168.1.0 255.255.255.0192.168.3.1//configure static routes to destination subnet 192.168.1.0/24 and next hop is 192.168.3.1
5) Save configuration

Ruijie(config)#end         Ruijie#write

Verification
You can use "ping" on a station in network 1 to verify network connectivity
"run"-->"cmd"-->"ping x.x.x.x" (x.x.x.x isa host in network 2)
How to display ip routing table
Ruijie#show ip route
Codes:
      C - connected, S - static, R -RIP, B - BGP
      O - OSPF, IA - OSPF inter area
      N1 - OSPF NSSA external type 1,N2 - OSPF NSSA external type 2
      E1 - OSPF external type 1, E2 -OSPF external type 2
      i - IS-IS, su - IS-IS summary, L1- IS-IS level-1, L2 - IS-IS level-2
      ia - IS-IS inter area, * -candidate default
Gateway of last resort is no set
S    192.168.2.0/24 via 192.168.3.2
C    192.168.3.0/24 is directlyconnected, GigabitEthernet 0/25
C    192.168.3.1/32 is the local host.
C    192.168.1.0/24 is directlyconnected, FastEthernet 0/1
C    192.168.1.254/32 is the localhost.   

Web-based configuration:
Note: Take S5310-24GT4XS-P-E version: RGOS 12.5(4)B0702P3 as an example. Most of the Ruijie switches that support static routing are configured in a similar way.
After completing the ip address assignment of the two switches.
1) The location of this function on the eweb page
Configuration—Interfaced•Switches•Routers—Add Static Route
data/attachment/forum/202305/15/100052b9t9uuljuklazcje.png
2) Configure Static Route on SW1
data/attachment/forum/202305/15/100106d6jfflhheufqqdu4.png
Administrative distance: The lower the administrative distance value, the higher the priority of the route.
The default value for static routing is 1.
3) Configure Static Route on SW2
data/attachment/forum/202305/15/100124asu9tgss6hs91jhu.pngNote:
1) When you configure static routes, there're two ways to specify next hop. Youcan specify an IP address ,or you can specify a local outgoing interface.
2) We suggest you use IP address as next hop
Verification:
SW1:
data/attachment/forum/202305/15/100146rmfkk5as71mmf5nr.pngSW2:
data/attachment/forum/202305/15/100203z3g3030y3ol3ze0e.png
Pages: [1]
View full version: How to configure static routes on Ruijie Switch?