Forgot password?
 Register now

Welcome to use this form to feedback your problems with Ruijie Community

The category of your feedback

Your Feedback

Your Email address (optional):

How to configure OSPF on Ruijie Switch? Reply

GTAC-Sophia

Level 5

Ruijie Staff

How to configure OSPF on Ruijie Switch?
31 0 2024-11-15 10:19:30
Original
Introduction:

The open shortest  path first (OSPF) is an Interior Gateway Protocol (IGP) that is used within the autonomous system (AS) to allow routers to obtain a route to a remote network. In  the early stage after dynamic routing emerges, Routing  Information Protocol (RIP) was mainly used on the network. RIP is a distance vector routingprotocol, facing some problems such as slow convergence, routing loop, poorscalability, and use for simple networks only. OSPF Version 2 (OSPFv2) is a link-state routing protocol, which can effectively fix the above problems.Therefore, OSPFv2 is widely used on large and medium-sized networks.

Topology:

Make all networks interoperable





Configurationsteps:

1. Configure the Interface IP Address on all devices.
#Device A's configuration.


DeviceA > enable

DeviceA #configure terminal

DeviceA (config) #interface gigabitethernet 0/1

DeviceA (config-if-GigabitEthernet 0/1) #ip address 192.168.1.1 255.255.255.0

DeviceA (config-if-GigabitEthernet 0/1) #exit

DeviceA (config) #interface gigabitethernet 0/2

DeviceA (config-if-GigabitEthernet 0/2) #ip address 192.168.2.1 255.255.255.0

DeviceA (config-if-GigabitEthernet 0/2) #exit



#Device B configuration.


DeviceB > enabled

DeviceB #configure terminal

DeviceB (config) #interface gigabitethernet 0/1

DeviceB (config-if-GigabitEthernet 0/1) #ip address 192.168.1.2 255.255.255.0

DeviceB (config-if-GigabitEthernet 0/1) #exit

DeviceB (config) #interface gigabitethernet 0/2

DeviceB (config-if-GigabitEthernet 0/2) #ip address 192.168.3.1 255.255.255.0

DeviceB (config-if-GigabitEthernet 0/2) #exit



#Device C configuration.


DeviceC > enable

DeviceC #configure terminal

DeviceC (config) #interface gigabitethernet 0/3

DeviceC (config-if-GigabitEthernet 0/3) #ip address 192.168.2.2 255.255.255.0

DeviceC (config-if-GigabitEthernet 0/3) #exit



#Device D configuration.


DeviceD > enabled

DeviceD #configure terminal

DeviceD (config) #interface gigabitethernet 0/3

DeviceD (config-if-GigabitEthernet 0/3) #ip address 192.168.3.2 255.255.255.0

DeviceD (config-if-GigabitEthernet 0/3) #exit





2. Configure the OSPF instance, Router ID, and add the interface address to OSPF


#Device A's configuration.


DeviceA (config) #router ospf 1

DeviceA (config-router) #router-id 192.168.1.1

DeviceA (config-router) #network 192.168.1.0 0.0.0.255 area 0

DeviceA (config-router) #network 192.168.2.0 0.0.0.255 area 1



#Device B configuration.


DeviceB (config) #router ospf 1

DeviceB (config-router) #router-id 192.168.1.2

DeviceB (config-router) #network 192.168.1.0 0.0.0.255 area 0

DeviceB (config-router) #network 192.168.3.0 0.0.0.255 area 2



#Device C configuration.


DeviceC (config) #router ospf 1

DeviceC (config-router) #router-id 192.168.2.2

DeviceC (config-router) #network 192.168.2.0 0.0.0.255 area 1



#Device D configuration.


DeviceD (config) #router ospf 1

DeviceD (config-router) #router-id 192.168.3.2

DeviceD (config-router) #network 192.168.3.0 0.0.0.255 area 2



Verification:

Check Device A's OSPF neighbors and routes.

#Device A's OSPF route.


Device A #show ip route ospf

OIA 192.168.3.0/24 [110/2] via 192.168.1.2, 00:18:03, GigabitEthernet 0/1



#Device A's neighbor information.


DeviceA #show ip ospf neighbors

OSPFprocess 1, 2 Neighbors, 2 is Full:

NeighborID Pri State Dead Time Address Interface

192.168.1.21 Full/DR 00:00:40 192.168.1.2 GigabitEthernet 0/1

192.168.2.21 Full/BDR 00:00:34 192.168.2.2 GigabitEthernet 0/2




(2) Check Device B's OSPF neighbors and routes.

#OSPF route for Device B.


DeviceB #show ip route ospf

OIA 192.168.2.0/24 [110/2] via 192.168.1.2, 00:18:03, GigabitEthernet 0/1



#Device B's neighbor information.


DeviceB #show ip ospf neighbors

OSPFprocess 1, 2 Neighbors, 2 is Full:

NeighborID Pri State Dead Time Address Interface

192.168.1.11 Full/BDR 00:00:32 192.168.1.1 GigabitEthernet 0/1

192.168.3.21 Full/BDR 00:00:30 192.168.3.2 GigabitEthernet 0/2




(3) Check Device C's OSPF neighbors and routes.

#OSPF routing for Device C.

DeviceC #show ip route ospf



OIA 192.168.1.0/24 [110/2] via 192.168.2.1, 00:19:05, GigabitEthernet 0/3

OIA 192.168.3.0/24 [110/3] via 192.168.2.1, 00:19:05, GigabitEthernet 0/3



#Device C's neighbor information.


DeviceC #show ip ospf neighbors

OSPFprocess 1, 1 Neighbors, 1 is Full:

NeighborID Pri State Dead Time Address Interface

192.168.1.11 Full/BDR 00:00:32 192.168.2.1 GigabitEthernet 0/3



(4) Check Device D's OSPF neighbors and routes.

#OSPF route for Device D.

Device D #show ip route ospf


OIA 192.168.1.0/24 [110/2] via 192.168.3.1, 00:19:05, GigabitEthernet 0/3

OIA 192.168.2.0/24 [110/3] via 192.168.3.1, 00:19:05, GigabitEthernet 0/3



#Device D's neighbor information.


DeviceD #show ip ospf neighbors

OSPFprocess 1, 1 Neighbors, 1 is Full:

NeighborID Pri State Dead Time Address Interface

192.168.1.21 Full/BDR 00:00:30 192.168.3.1 GigabitEthernet 0/3




(5) detected on the Device D address 192.168.2.2network reachability.


DeviceD #ping 192.168.2.2

Sending5,100-byte ICMP Echoes to 192.168.2.2, timeout is 2 seconds:

<press Ctrl + C to break >

!!!!!

Successrate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms.


RG-CS85 Series

Configuration Data Center Switch
There are no replies.
Related Posts
Product Model

Share this topic to

Cancel

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