OSPF IPv4 - Initial Configuration

Initial Configuration

OSPF (Open Shortest Path First) for IPv4 initial configuration involves setting up the necessary parameters to establish and maintain OSPF routing within a network. Key elements in the initial configuration include defining OSPF router IDs, specifying OSPF areas, configuring interfaces, and establishing OSPF neighbor relationships. The router ID uniquely identifies each OSPF router within the OSPF domain, and it can be manually assigned or automatically determined based on the highest IP address of any of the router's active interfaces. OSPF areas are defined to partition the network into logical segments, facilitating efficient routing and minimizing the impact of topology changes. Interface configuration involves enabling OSPF on interfaces and specifying the area to which they belong. OSPF routers discover neighbors by exchanging Hello packets, and configuring routers to recognize and form adjacencies with neighbors is a fundamental aspect of the initial OSPF setup. Proper OSPF IPv4 initial configuration is critical for building a stable and functional OSPF network, ensuring routers effectively exchange routing information and compute optimal paths throughout the OSPF domain.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an Dzas isdz basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE

Task 1: Configure IPv6 OSPF process for Autonomous

Step 1: In the configuration mode of router configure IPv6 OSPF Process by following command:

R1:
router ospf 1                           ! ( Initiate OSPF process for Process ID 1)
network 11.0.1.1 255.255.255.0 area 1   ! (Send updates on int. where these N/W
network 11.0.2.1 255.255.255.0 area 1   are configured in given area)
network 11.0.3.1 255.255.255.0 area 1
network 12.0.0.1 255.255.255.0 area 1
exit
R2:
router ospf 1
network 22.0.1.2 255.255.255.0 area 0
network 22.0.2.2 255.255.255.0 area 0
network 22.0.3.2 255.255.255.0 area 0
network 12.0.0.2 255.255.255.0 area 1
network 23.0.0.2 255.255.255.0 area 0
exit
R3:
router ospf 1
network 33.0.1.3 255.255.255.0 area 0
network 33.0.2.3 255.255.255.0 area 0
network 33.0.3.3 255.255.255.0 area 0
network 23.0.0.3 255.255.255.0 area 0
network 34.0.0.3 255.255.255.0 area 2
exit
R4:
router ospf 1
network 44.0.1.4 255.255.255.0 area 2
network 44.0.2.4 255.255.255.0 area 2
network 44.0.3.4 255.255.255.0 area 2
network 34.0.0.4 255.255.255.0 area 2
exit

Task 2: Verification:

Step 1: Verify IP protocols and its details by following command:

R2#show ip protocols
! (Gives details of protocols running on router)

*** IP Routing is NSF aware ***

Routing Protocol is "ospf 1"
 Outgoing update filter list for all interfaces is not set
 Incoming update filter list for all interfaces is not set
 Router ID 22.0.3.2
 It is an area border router
 Number of areas in this router is 2. 2 normal 0 stub 0 nssa
 Maximum path: 4
 Routing for Networks:
 12.0.0.2 0.0.0.0 area 1
 22.0.1.2 0.0.0.0 area 0
 22.0.2.2 0.0.0.0 area 0
 22.0.3.2 0.0.0.0 area 0
 23.0.0.2 0.0.0.0 area 0
 Routing on Interfaces Configured Explicitly (Area 0):
 Loopback1
 Loopback2
 Loopback3
 Ethernet0/0
 Routing on Interfaces Configured Explicitly (Area 1):
 Serial2/0
 Routing Information Sources:
 Gateway   Distance Last Update
 11.0.3.1    110     00:25:10
 33.0.3.3    110     00:2

Step 2: Verify OSPF updates are sent on relevant interfaces by following command:

! (Gives detailed list of interfaces on which OSPF is sending updates)
Loopback1 is up, line protocol is up
 Internet Address 22.0.1.2/24, Area 0, Attached via Interface Enable
 Process ID 1, Router ID 22.0.3.2, Network Type LOOPBACK, Cost: 1
 Topology-MTID Cost Disabled Shutdown Topology Name
      0        1    no       no       Base
 Enabled by interface config, including secondary ip addresses
 Loopback interface is treated as a stub Host
Loopback2 is up, line protocol is up
 Internet Address 22.0.2.2/24, Area 0, Attached via Interface Enable
 Process ID 1, Router ID 22.0.3.2, Network Type LOOPBACK, Cost: 1
 Topology-MTID Cost Disabled Shutdown Topology Name
   0           1       no    no      Base
 Enabled by interface config, including secondary ip addresses
 Loopback interface is treated as a stub Host
Loopback3 is up, line protocol is up
 Internet Address 22.0.3.2/24, Area 0, Attached via Interface Enable
 Process ID 1, Router ID 22.0.3.2, Network Type LOOPBACK, Cost: 1
 Topology-MTID Cost Disabled Shutdown Topology Name
     0         1    no       no       Base
 Enabled by interface config, including secondary ip addresses
 Loopback interface is treated as a stub Host
Ethernet0/0 is up, line protocol is up
 Internet Address 23.0.0.2/24, Area 0, Attached via Interface Enable
 Process ID 1, Router ID 22.0.3.2, Network Type BROADCAST, Cost: 10
 Topology-MTID Cost Disabled Shutdown Topology Name
      0        1    no        no      Base
 Enabled by interface config, including secondary ip addresses
 Transmit Delay is 1 sec, State BDR, Priority 1
 Designated Router (ID) 33.0.3.3, Interface address 23.0.0.3
 Backup Designated router (ID) 22.0.3.2, Interface address 23.0.0.2
 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
 oob-resync timeout 40
 Hello due in 00:00:02
 Supports Link-local Signaling (LLS)
 Cisco NSF helper support enabled
 IETF NSF helper support enabled
 Index 4/4, flood queue length 0
 Next 0x0(0)/0x0(0)
 Last flood scan length is 1, maximum is 1
 Last flood scan time is 0 msec, maximum is 0 msec
 Neighbor Count is 1, Adjacent neighbor count is 1
 Adjacent with neighbor 33.0.3.3 (Designated Router)
 Suppress hello for 0 neighbor(s)
Serial2/0 is up, line protocol is up
 Internet Address 12.0.0.2/24, Area 1, Attached via Interface Enable
 Process ID 1, Router ID 22.0.3.2, Network Type POINT_TO_POINT, Cost: 64
 Topology-MTID Cost Disabled Shutdown Topology Name
 0 64 no no Base
 Enabled by interface config, including secondary ip addresses
 Transmit Delay is 1 sec, State POINT_TO_POINT
 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
 oob-resync timeout 40
 Hello due in 00:00:01
 Supports Link-local Signaling (LLS)
 Cisco NSF helper support enabled
 IETF NSF helper support enabled
Index 1/5, flood queue length 0
 Next 0x0(0)/0x0(0)
 Last flood scan length is 6, maximum is 6
 Last flood scan time is 0 msec, maximum is 1 msec
 Neighbor Count is 1, Adjacent neighbor count is 1
 Adjacent with neighbor 11.0.3.1
 Suppress hello for 0 neighbor(s)

Step 3: Verify OSPF neighborship by following command:

R2#show ip ospf neighbors
! (Gives list of OSPF neighbors)
Neighbor ID Pri State    Dead Time  Address    Interface
33.0.3.3     1  FULL/DR  00:00:34   23.0.0.3   Ethernet0/0
11.0.3.1     0  FULL/-   00:00:33   12.0.0.1   Serial2/0

Step 4: Verify OSPF database by following command:

R2#show ip ospf Database
! (Shows details of OSPF database based on Area Perspective and LSA Perspective)

 OSPF Router with ID (22.0.3.2) (Process ID 1)

     Router Link States (Area 0)

Link ID    ADV Router  Age   Seq#       Checksum Link count
22.0.3.2   22.0.3.2    391   0x80000004 0x00BC7E    4
33.0.3.3   33.0.3.3    386   0x80000004 0x00A35A    4

      Net Link States (Area 0)

Link ID    ADV Router  Age   Seq#       Checksum
23.0.0.3   33.0.3.3    386   0x80000002 0x00595C

      Summary Net Link States (Area 0)

Link ID ADV  Router     Age   Seq#        Checksum
11.0.1.1     22.0.3.2   391   0x80000002  0x00874B
11.0.2.1     22.0.3.2   391   0x80000002  0x007C55
11.0.3.1     22.0.3.2   391   0x80000002  0x00715F
12.0.0.0     22.0.3.2   391   0x80000002  0x00854F
34.0.0.0     33.0.3.    386   0x80000002  0x00FCB5
44.0.1.4     33.0.3.3   386   0x80000002  0x005151
44.0.2.4     33.0.3.3   386   0x80000002  0x00465B
44.0.3.4     33.0.3.3   386   0x80000002  0x003B65

      Router Link States (Area 1)

Link ID   ADV Router Age   Seq#     Checksum Link count
11.0.3.1   11.0.3.1  405 0x80000003   0x003BB7 5
22.0.3.2   22.0.3.2  391 0x80000002   0x000340 2

      Summary Net Link States (Area 1)

Link ID   ADV Router Age   Seq#     Checksum
22.0.1.2   22.0.3.2  391 0x80000002 0x006B9B
22.0.2.2   22.0.3.2  391 0x80000002 0x0060A5
22.0.3.2   22.0.3.2  391 0x80000002 0x0055AF
23.0.0.0   22.0.3.2  391 0x80000002 0x00D728
33.0.1.3   22.0.3.2  391 0x80000002 0x0036BA
33.0.2.3   22.0.3.2  391 0x80000002 0x002BC4
33.0.3.3   22.0.3.2  391 0x80000002 0x0020CE
34.0.0.0   22.0.3.2  391 0x80000002 0x00CAE9
44.0.1.4   22.0.3.2  391 0x80000002 0x001F85
44.0.2.4   22.0.3.2  391 0x80000002 0x00148F
44.0.3.4   22.0.3.2  391 0x80000002 0x000999

Step 5: Verify routing table and OSPF route entries by following command:

R2#show ip route
! (Shows router’s routing table and IPv4 routes entries)

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, 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, U - per-user static route
 o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
 + - replicated route, % - next hop override

Gateway of last resort is not set

 11.0.0.0/32 is subnetted, 3 subnets
O 11.0.1.1 [110/65] via 12.0.0.1, 00:45:16, Serial2/0
O 11.0.2.1 [110/65] via 12.0.0.1, 00:45:16, Serial2/0
O 11.0.3.1 [110/65] via 12.0.0.1, 00:45:16, Serial2/0
 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0.0/24 is directly connected, Serial2/0
L 12.0.0.2/32 is directly connected, Serial2/0
 22.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 22.0.1.0/24 is directly connected, Loopback1
L 22.0.1.2/32 is directly connected, Loopback1
C 22.0.2.0/24 is directly connected, Loopback2
L 22.0.2.2/32 is directly connected, Loopback2
C 22.0.3.0/24 is directly connected, Loopback3
L 22.0.3.2/32 is directly connected, Loopback3
 23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 23.0.0.0/24 is directly connected, Ethernet0/0
L 23.0.0.2/32 is directly connected, Ethernet0/0
 33.0.0.0/32 is subnetted, 3 subnets
O 33.0.1.3 [110/11] via 23.0.0.3, 00:44:40, Ethernet0/0
O 33.0.2.3 [110/11] via 23.0.0.3, 00:44:40, Ethernet0/0
O 33.0.3.3 [110/11] via 23.0.0.3, 00:44:40, Ethernet0/0
 34.0.0.0/24 is subnetted, 1 subnets
O IA 34.0.0.0 [110/74] via 23.0.0.3, 00:44:40, Ethernet0/0
 44.0.0.0/32 is subnetted, 3 subnets
O IA 44.0.1.4 [110/75] via 23.0.0.3, 00:44:40, Ethernet0/0
O IA 44.0.2.4 [110/75] via 23.0.0.3, 00:44:40, Ethernet0/0
O IA 44.0.3.4 [110/75] via 23.0.0.3, 00:44:40, Ethernet0/0