configuration
R1:
int g0/0
no swi
ip a 10.0.0.1 24
int l 0
ip a 1.1.1.1 24
int l 1
ip a 192.168.1.1 24
route ospf 1 #create ospf process number as 1
network 192.168.1.1 0.0.0.255 area 0 # Declare the network segment as area0
network 10.0.0.0 0.0.0.255 area 0
R2:
int g0/0
no swi
ip a 10.0.0.2 24
int g0/1
no swi
ip a 20.0.0.2 24
int l 0
ip a 2.2.2.2 24
route ospf 1
network 10.0.0.0 0.0.0.255 area 0
network 20.0.0.0 0.0.0.255 area 0
R3
int g0/0
no swi
ip a 20.0.0.1 24
int l 0
ip a 3.3.3.3 32
int l 1
ip a 192.168.2.1 24
route ospf 1
network 20.0.0.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
Use the command on the intermediate router to view the information
You can see that the two neighbors have been established successfully
Routing can also be learned normally
Other Ruijie OSPF related commands:
Interface view: ip ospf network point-topoint |
Adjust the ospf network type of the interface |
Process view: default-information originate always |
After adding the always parameter, the device will deliver the default route to the ospf area no matter there is an effective default route locally on the device. When the always parameter is not added, it can only be published when there is a valid default route on the device |
show ip ospf neighbors |
View neighbor information |
show ip ospf route |
View the routes learned by ospf |
show ip ospf database |
View ospf database tables |