Basic configuration of router OSPF
After all the connectivity tests are successful, you can enter the basic configuration of the OSPF protocol and advertise all the IP segments of the interfaces that need to enable the OSPF protocol in each router to OSPF. Note that OSPF is a classless routing protocol that supports scalable subnets of VLSM.
The global configuration mode of R1 is used to declare the OSPF protocol.
- R1 (config) # router ospf 100 enters the OSPF process, followed by the process number 100
-
- R1config-router) # net 1.1.1.0 0.0.0.255 area 0 declared 1.1.1.0/24 network segment, the area is 0, that is, declared to enter the backbone area "0.
-
- R1 (config-router) # net 199.99.1.0 0.0.0.255 area 0 declares the network segment of 199.99.1.0/24, followed by area 0, that is, declaring the network segment to "0" in the backbone area.
Announcement of the OSFP protocol in the global configuration mode of R2
- R2 (config) # router ospf 100 enters the OSPF process, followed by the process number 100
-
- R2 (config-router) # net 2.2.2.0 0.0.0.255 area 0 declares the 2.2.2.0/24 network segment, and the area is 0, that is, it is declared to enter the backbone area "0.
-
- R2 (config-router) # net 199.99.1.0 0.0.0.255 area 0 declares the network segment of 199.99.1.0/24, followed by the area is 0, that is, it is declared to enter the backbone area "0.
-
- R2 (config-router) # net 199.99.2.0 0.0.0.255 area 0 declares the network segment of 199.99.2.0/24, followed by area 0, that is, declaring the network segment to "0" in the backbone area.
The global configuration mode of R3 is used to declare the OSPF protocol.
- R3 (config) # router ospf 100 enters the OSPF process, followed by the process number 100
-
- R3 (config-router) # net 3.3.3.0 0.0.0.255 area 0 declares the network segment 3.3.3.0/24, and the area is 0, that is, it is declared to enter the backbone area "0.
-
- R3 (config-router) # net 199.99.2.0 0.0.0.255 area 0 declares the network segment of 199.99.2.0/24, followed by area 0, that is, declaring the network segment to "0" in the backbone area.
Test OSPF connectivity
After completing all the preceding configurations, wait two seconds until all the three routers use the OSPF protocol to learn the advertised route CIDR blocks.
- R3#
-
- 00:08:29: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done
After OSPF of R3 is configured, the system prompts that a complete OSPF neighbor is created. 100 indicates the OSPF process ID and Nbr indicates the route ID of the neighbor router, you can see the information learned from which interface, and the neighbor status information is complete.
Then, you can easily initiate a test on R1. This test is to test whether the OSPF protocol has correctly learned the route CIDR Block advertised by other routers. It must be separated from the above interface test. This is a protocol test.
The source address 1.1.1.1 ping Destination Address 3.3.3.3 on R1 sends 100 test packages:
- R1#ping 3.3.3.3 source 1.1.1.1 repeat 100
-
- Type escape sequence to abort.
-
- Sending 100, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
-
- Packet sent with a source address of 1.1.1.1
-
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- Success rate is 100 percent (100/100), round-trip min/avg/max = 8/39/96 ms
"!" "." Or "U" indicates "reachable.
The basic configuration and connectivity test of the router OSPF are completed. Next, we will introduce step 4 of router OSPF configuration: query the OSPF neighbor table on the router.
- Result Analysis of router OSPF Configuration
- Basic description of router OSPF Configuration
- Describes the basic interface configuration for router OSPF configuration.
- Test interface connectivity for router OSPF Configuration
- Describes how to query the OSPF neighbor table on a router in the OSPF configuration of a router.
- Describes how to query the connection status database of ospf on a Router Based on the OSPF configuration of a router.