# OSPF Multi-Area Configuration

### <mark style="color:blue;">**Objective**</mark>

In this guide, you'll learn how to configure <mark style="color:red;">**OSPF Multi-Area**</mark> in <mark style="color:red;">**GNS3**</mark> step by step using a practical topology.

### <mark style="color:blue;">**Step 1: Understanding OSPF Multi-Area**</mark>

OSPF (Open Shortest Path First) is a <mark style="color:red;">**link-state**</mark> routing protocol that divides large networks into smaller, more manageable areas. This improves scalability and performance.

* **Backbone Area (Area 0)** – The central area where all other areas must connect.
* **Regular Areas (Area 1, Area 2, etc.)** – Non-backbone areas connected to **Area 0**.
* **ABR (Area Border Router)** – Connects different OSPF areas.
* **ASBR (Autonomous System Boundary Router)** – Connects OSPF to external networks.

### <mark style="color:blue;">**Step 2: Network Topology**</mark>

We'll configure **OSPF Multi-Area** using the following topology:

<figure><img src="/files/cCb9nlEfAxBWQJgas7Yh" alt=""><figcaption><p>Topology</p></figcaption></figure>

### <mark style="color:blue;">**Step 3: Configuring OSPF Multi-Area in GNS3**</mark>

#### **Open GNS3 and Create the Topology**

* Drag and drop **5 Cisco routers** (e.g., **IOSv or 7200**).
* Connect interfaces as per the **IP Addressing Scheme**.
* Assign **IP addresses** to each router interface.

#### Configuring R1 (ABR for Area 0 and Area 1)

```
R1#configure terminal
R1(config)#interface serial 3/0
R1(config-if)#ip address 192.168.1.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 3/1
R1(config-if)#ip address 192.168.2.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.3 area 0
R1(config-router)#network 192.168.2.0 0.0.0.3 area 1
```

#### Configuring R2 (ABR for Area 0 and Area 2)

```
R2#configure terminal
R2(config)#interface serial 3/1
R2(config-if)#ip address 192.168.3.1 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 3/0
R2(config-if)#ip address 192.168.1.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 3/2                                                                                        changed state to down
R2(config-if)#ip address 192.168.4.1 255.255.255.252
R2(config-if)#no shutdown                                                                                        changed state to up
R2(config-if)#router ospf 1
R2(config-router)#network 192.168.1.0 0.0.0.3 area 0
R2(config-router)#network 192.168.3.0 0.0.0.3 area 2
R2(config-router)#network 192.168.4.0 0.0.0.3 area 2
```

#### Configuring R3 (Area 2)

```
R3#configure terminal
R3(config)#interface serial 3/1
R3(config-if)#ip address 192.168.3.2 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#network 192.168.3.0 0.0.0.3 area 2
```

#### Configuring R4 (Area 1)

```
R4#configure terminal
R4(config)#interface serial 3/1
R4(config-if)#ip address 192.168.2.2 255.255.255.252
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#network 192.168.2.0 0.0.0.3 area 1
```

#### Configuring R5 (Area 2)

```
R5#configure terminal
R5(config)#interface serial 3/2
R5(config-if)#ip address 192.168.4.2 255.255.255.252
R5(config-if)#no shutdown
R5(config-if)#exit
R5(config)#router ospf 1
R5(config-router)#network 192.168.4.0 0.0.0.3 area 2
```

### <mark style="color:blue;">**Step 4: Verifying OSPF Multi-Area Configuration**</mark>

#### **Check OSPF Neighbor Adjacencies**

On each router, run:

```
R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.2.1       0   FULL/  -        00:00:39    192.168.1.1     Serial3/0
192.168.4.2       0   FULL/  -        00:00:35    192.168.4.2     Serial3/2
192.168.3.2       0   FULL/  -        00:00:37    192.168.3.2     Serial3/1
R2#
```

This should display adjacent routers.

#### Check OSPF Routing Table

```
R5#show ip route ospf
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

      192.168.1.0/30 is subnetted, 1 subnets
O IA     192.168.1.0 [110/128] via 192.168.4.1, 00:06:45, Serial3/2
      192.168.2.0/30 is subnetted, 1 subnets
O IA     192.168.2.0 [110/192] via 192.168.4.1, 00:06:45, Serial3/2
      192.168.3.0/30 is subnetted, 1 subnets
O        192.168.3.0 [110/128] via 192.168.4.1, 00:06:45, Serial3/2
R5#
```

Ensure routes from different areas appear as **Inter-Area (O IA)**.

#### Check OSPF Database

```
R2#show ip ospf database

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

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.2.1     192.168.2.1     543         0x80000004 0x0097EE 2
192.168.4.1     192.168.4.1     637         0x80000002 0x007312 2

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.2.0     192.168.2.1     534         0x80000001 0x001216
192.168.3.0     192.168.4.1     628         0x80000001 0x00F82C
192.168.4.0     192.168.4.1     442         0x80000001 0x00ED36

                Router Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.3.2     192.168.3.2     632         0x80000001 0x00CAB6 2
192.168.4.1     192.168.4.1     442         0x80000005 0x000195 4
192.168.4.2     192.168.4.2     447         0x80000001 0x00DAA2 2

                Summary Net Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.0     192.168.4.1     638         0x80000001 0x000F18
192.168.2.0     192.168.4.1     533         0x80000001 0x00865F
R2#
```

Verify **LSAs** are correctly exchanged.

### <mark style="color:blue;">Step 5: Testing Connectivity</mark>

```
R1#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/26/52 ms
R1#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/9/20 ms
R1#ping 192.168.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R1#ping 192.168.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/34/48 ms
R1#ping 192.168.4.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/34/52 ms
R1#
```

If successful, the OSPF Multi-Area setup is correctly configured!

### <mark style="color:blue;">Keywords</mark>

`OSPF Multi-Area`, `OSPF Configuration`, `GNS3 Simulation`, `OSPF Areas`, `OSPF ABR`, `OSPF ASBR`, `OSPF Backbone`, `OSPF Area 0`, `OSPF Routing`, `OSPF Network`, `OSPF LSA`, `OSPF Neighbor`, `OSPF Database`, `OSPF Summarization`, `OSPF Virtual Link`, `OSPF Authentication`, `OSPF Troubleshooting`, `OSPF Cost`, `OSPF Metric`, `OSPF Convergence`, `CCNA`, `CCNP`, `سیسکو`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://netsec.nerd-cafe.ir/network-engineering/ccnp/ospf-multi-area-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
