In this lab, I simulated an internal network using OSPF with multiple areas. Area 0 is used as the backbone, while Areas 1 and 2 represent separate internal parts of the network. RT-3 and RT-6 act as Area Border Routers (ABRs) and connect their local areas to Area 0.
RT-1 acts as the Autonomous System Boundary Router (ASBR) at the edge of the OSPF network. It has a default route toward the ISP and advertises that default route into OSPF, allowing the internal routers to reach external networks.
The access routers use the 192.168.0.0/16 address range for local networks. The simulated Internet is represented by an ISP router with the loopback address 8.8.8.8. Connectivity was verified by successfully pinging 8.8.8.8 from an internal network.
The objectives of this lab are:
Configure OSPF using multiple areas.
Build Area 0 as the OSPF backbone.
Configure and verify Area Border Routers (ABRs).
Configure an Autonomous System Boundary Router (ASBR).
Advertise a default route through OSPF.
Advertise local networks from different OSPF areas.
Verify OSPF neighbors, routes, areas, and end-to-end connectivity.
The goal is to connect a multi-area OSPF network to an external network.
RT-1 is the edge router and acts as the ASBR. It connects the internal OSPF network to the ISP and has a static default route pointing toward the ISP. RT-1 then advertises this default route into OSPF.
Area 0 is the backbone area and connects the edge router to the ABRs. RT-3 connects Area 1 to Area 0, while RT-6 connects Area 2 to Area 0. The remaining routers operate inside their respective areas and advertise their local networks through OSPF.
The ISP router does not participate in OSPF. Instead, it represents the external network and uses a static default route pointing back toward RT-1 so that return traffic can reach the internal networks.
The topology consists of an OSPF backbone (Area 0), two additional OSPF areas (Areas 1 and 2), and an external ISP router.
RT-1: ASBR and connection to the ISP
RT-2: Area 0 core router
RT-3: ABR between Areas 0 and 1
RT-4 and RT-5: Routers in Area 1
RT-6: ABR between Areas 0 and 2
RT-7, RT-8, and RT-9: Routers in Area 2
ISP: External network / simulated Internet
I used a simple addressing pattern for the router-to-router links. The second octet identifies the routers connected by the link. For example:
RT-1 to RT-2: 10.10.12.0/30
RT-2 to RT-3: 10.10.23.0/30
RT-2 to RT-6: 10.10.26.0/30
RT-3 to RT-4: 10.10.34.0/30
RT-4 to RT-5: 10.10.45.0/30
RT-6 to RT-7: 10.10.67.0/30
RT-7 to RT-8: 10.10.78.0/30
RT-7 to RT-9: 10.10.79.0/30
RT-1 to ISP: 10.10.10.0/30
The access networks behind RT-5 and RT-8 use the 192.168.0.0/16 range:
RT-5 Loopback 1: 192.168.10.0/24
RT-5 Loopback 2: 192.168.20.0/24
RT-8 Loopback 3: 192.168.30.0/24
RT-8 Loopback 4: 192.168.40.0/24
The ISP router uses 8.8.8.8/32 as a loopback address to represent an Internet destination.
conf t
hostname ISP
interface loopback 1
description Google DNS represents the Internet
ip address 8.8.8.8 255.255.255.255
exit
interface gig0/0/0
media-type sfp
ip address 10.10.10.1 255.255.255.252
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 10.10.10.2
do write
conf t
hostname RT-1
interface gig0/0/0
media-type sfp
ip address 10.10.10.2 255.255.255.252
no shutdown
exit
router ospf 1
router-id 1.1.1.1
default-information originate
exit
interface gig0/0/1
ip address 10.10.12.1 255.255.255.252
ip ospf 1 area 0
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 10.10.10.1
do write
conf t
hostname RT-2
router ospf 1
router-id 2.2.2.2
exit
interface gig0/0
ip address 10.10.12.2 255.255.255.252
ip ospf 1 area 0
no shutdown
exit
int gig0/1
ip address 10.10.23.1 255.255.255.252
ip ospf 1 area 0
no shutdown
exit
int gig0/2
ip address 10.10.26.1 255.255.255.252
ip ospf 1 area 0
no shutdown
exit
do write
conf t
hostname RT-3
router ospf 1
router-id 3.3.3.3
exit
int gig0/0/0
ip address 10.10.23.2 255.255.255.252
ip ospf 1 area 0
no shutdown
exit
int gig0/0/1
ip address 10.10.34.1 255.255.255.252
ip ospf 1 area 1
no shutdown
exit
do write
conf t
hostname RT-4
router ospf 1
router-id 4.4.4.4
exit
int gig0/0/0
ip address 10.10.34.2 255.255.255.252
ip ospf 1 area 1
no shutdown
exit
int gig0/0/1
ip address 10.10.45.1 255.255.255.252
ip ospf 1 area 1
no shutdown
exit
do write
conf t
hostname RT-5
router ospf 1
router-id 5.5.5.5
exit
int gig0/0/0
ip address 10.10.45.2 255.255.255.252
ip ospf 1 area 1
no shutdown
exit
int loopback 1
ip address 192.168.10.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 1
exit
int loopback 2
ip address 192.168.20.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 1
exit
do write
conf t
hostname RT-6
router ospf 1
router-id 6.6.6.6
exit
int gig0/0/0
ip address 10.10.26.2 255.255.255.252
ip ospf 1 area 0
no shutdown
exit
int gig0/0/1
ip address 10.10.67.1 255.255.255.252
ip ospf 1 area 2
no shutdown
exit
do write
conf t
hostname RT-7
router ospf 1
router-id 7.7.7.7
exit
int gig0/0
ip address 10.10.67.2 255.255.255.252
ip ospf 1 area 2
no shutdown
exit
int gig0/1
ip address 10.10.78.1 255.255.255.252
ip ospf 1 area 2
no shutdown
exit
int gig0/2
ip address 10.10.79.1 255.255.255.252
ip ospf 1 area 2
no shutdown
exit
do write
conf t
hostname RT-8
router ospf 1
router-id 8.8.8.8
exit
int gig0/0/0
ip address 10.10.78.2 255.255.255.252
ip ospf 1 area 2
no shutdown
exit
int loopback 3
ip address 192.168.30.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 2
exit
int loopback 4
ip address 192.168.40.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 2
exit
do write
conf t
hostname RT-9
router ospf 1
router-id 9.9.9.9
exit
int gig0/0
ip address 10.10.79.2 255.255.255.252
ip ospf 1 area 2
no shutdown
exit
do write
I used several commands to verify the OSPF configuration, routing information, and end-to-end connectivity.
On RT-2:
show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 2WAY/DROTHER 00:00:31 10.10.12.1 GigabitEthernet0/0
3.3.3.3 1 2WAY/DROTHER 00:00:31 10.10.23.2 GigabitEthernet0/1
6.6.6.6 1 2WAY/DROTHER 00:00:31 10.10.26.2 GigabitEthernet0/2
show ip route ospf
10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
O IA 10.10.34.0 [110/2] via 10.10.23.2, 00:00:48, GigabitEthernet0/1
O IA 10.10.45.0 [110/3] via 10.10.23.2, 00:00:48, GigabitEthernet0/1
O IA 10.10.67.0 [110/2] via 10.10.26.2, 00:00:48, GigabitEthernet0/2
O IA 10.10.78.0 [110/3] via 10.10.26.2, 00:00:48, GigabitEthernet0/2
O IA 10.10.79.0 [110/3] via 10.10.26.2, 00:00:48, GigabitEthernet0/2
O IA 192.168.10.0 [110/4] via 10.10.23.2, 00:00:38, GigabitEthernet0/1
O IA 192.168.20.0 [110/4] via 10.10.23.2, 00:00:38, GigabitEthernet0/1
O IA 192.168.30.0 [110/4] via 10.10.26.2, 00:00:48, GigabitEthernet0/2
O IA 192.168.40.0 [110/4] via 10.10.26.2, 00:00:48, GigabitEthernet0/2
O*E2 0.0.0.0/0 [110/1] via 10.10.12.1, 00:00:48, GigabitEthernet0/0
I also used the command below on ABRs to check the area status on their interfaces:
show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Gig0/0/0 1 0 10.10.23.2/255.255.255.252 1 DR 0/0
Gig0/0/1 1 1 10.10.34.1/255.255.255.252 1 BDR 0/0
And pinged from one of local networks the 8.8.8.8 Ip address:
ping
Protocol [ip]:
Target IP address: 8.8.8.8
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 192.168.30.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
Packet sent with a source address of 192.168.30.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/9/13 ms
The lab successfully demonstrated a multi-area OSPF network connected to an external network. OSPF formed neighbor relationships between the routers, Area 0 provided the backbone connection between the different areas, and RT-3 and RT-6 operated as ABRs between the backbone and their respective areas.
RT-1 successfully operated as the ASBR and advertised the default route into OSPF. The internal routers learned the external default route as an O*E2 route.
The local networks behind RT-5 and RT-8 were also successfully advertised through OSPF. End-to-end connectivity was verified by sending traffic from the 192.168.30.0/24 network to 8.8.8.8, with a 100% ping success rate.
The Packet Tracer project file and exported device startup configurations are available on my GitHub for reference.