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: Configuration 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/1 Ruijie(config-if-FastEthernet 0/1)#no switchport Ruijie(config-if-FastEthernet 0/1)#ip address192.168.1.254 255.255.255.0 Ruijie(config-if-FastEthernet 0/1)#interfaceGigabitEthernet 0/25 Ruijie(config-if-GigabitEthernet 0/25)#noswitchport Ruijie(config-if-GigabitEthernet 0/25)#ip address192.168.3.1 255.255.255.0 Ruijie(config-if-GigabitEthernet 0/25)#exit 2) Assign IP address to SW2 Ruijie>enable Ruijie#configure terminal Ruijie(config)#interface fastethernet 0/1 Ruijie(config-if-FastEthernet 0/1)#no switchport Ruijie(config-if-FastEthernet 0/1)#ip address 192.168.2.254255.255.255.0 Ruijie(config-if-FastEthernet 0/1)#interfaceGigabitEthernet 0/25 Ruijie(config-if-GigabitEthernet 0/25)#noswitchport Ruijie(config-if-GigabitEthernet 0/25)#ip address192.168.3.2 255.255.255.0 Ruijie(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 [1/0] 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 The default value for static routing is 1. 3) Configure Static Route on SW2 Note: 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: SW2: |
This site contains user submitted content, comments and opinions and is for informational purposes only. Ruijie may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Ruijie can therefore provide no guarantee as to the efficacy of any proposed solutions on the community forums. Ruijie disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Ruijie Community Terms of Use.
More ways to get help: Visit Support Videos, call us via Service Hotline, Facebook or Live Chat.
©2000-2023 Ruijie Networks Co,Ltd