This lab article describes how to configure OSPFv2 multi-area using both interface method and global method. You will also learn how to configure passive interfaces, network type, and stub areas.
Lab Compatibility: Packet Tracer 8.2, GNS3, Cisco Modeling Labs
Cisco Certification: CCNA, CCNP
Lab Summary
- Enable OSPF on router connected interfaces of R1, R2, R3, INET-1 with interface method.
- Enable passive interfaces on LAN segments and loopback interfaces.
- Enable OSPF on router connected interfaces of Remote-1, Remote-2 with global method.
- Enable passive interfaces on LAN segments and loopback interfaces.
- Configure OSPF point-to-point network type on all WAN interfaces assigned to area 0.
- Configure Remote-1 and Remote-2 routers as OSPF stub areas.
- Advertise all LAN segments, connected WAN subnets, and loopbacks interfaces.
- Advertise a default route from INET-1 to all downstream neighbors for internet access.
- Verify lab configuration and OSPF routing tables.
Download Packet Tracer lab file: ospf.pkt
Step 1:
Enable OSPF on router connected interfaces of R1, R2, R3, and INET-1 with interface configuration method. Configure passive interfaces on LAN segments and loopback interfaces. Advertise all LAN segments and loopback interfaces to neighbors.
R1
interface Loopback0
description Management Interface
ip address 192.168.255.1 255.255.255.255
ip ospf 1 area 0
interface GigabitEthernet0/0/0
description link to R2 router
ip address 192.168.1.2 255.255.255.252
ip ospf 1 area 1
no shut
interface GigabitEthernet0/0/1
description link to INET-1 router
ip address 192.168.1.9 255.255.255.252
ip ospf 1 area 0
no shut
interface GigabitEthernet0/0/2
description link to R3 router
ip address 192.168.1.5 255.255.255.252
ip ospf 1 area 0
no shut
router ospf 1
passive-interface Loopback0
R2
interface Loopback0
description Management Interface
ip address 192.168.255.2 255.255.255.255
ip ospf 1 area 1
interface GigabitEthernet0/0/0
description link to R1 router
ip address 192.168.1.1 255.255.255.252
ip ospf 1 area 1
no shut
interface GigabitEthernet0/0/1
description LAN (172.16.1.0/24)
ip address 172.16.1.254 255.255.255.0
ip ospf 1 area 1
no shut
router ospf 1
passive-interface default
no passive-interface GigabitEthernet0/0/0
R3
interface Loopback0
description Management Interface
ip address 192.168.255.3 255.255.255.255
ip ospf 1 area 0
interface GigabitEthernet0/0/0
description link to R1 router
ip address 192.168.1.6 255.255.255.252
ip ospf 1 area 0
no shut
interface GigabitEthernet0/0/1
description link to INET-1 router
ip address 192.168.1.13 255.255.255.252
ip ospf 1 area 0
no shut
interface GigabitEthernet0/0/2
description link to Remote-1
ip address 192.168.1.17 255.255.255.252
ip ospf 1 area 2
no shut
router ospf 1
passive-interface Loopback0
INET-1
interface Loopback0
description Management Interface
ip address 192.168.255.4 255.255.255.255
ip ospf 1 area 0
interface GigabitEthernet0/0
description link to R1 router
ip address 192.168.1.10 255.255.255.252
ip ospf 1 area 0
no shut
interface GigabitEthernet1/0
description link to R3 router
ip address 192.168.1.14 255.255.255.252
ip ospf 1 area 0
no shut
interface GigabitEthernet2/0
description link to ISP router
ip address 172.33.1.1 255.255.255.252
no shut
interface GigabitEthernet3/0
description link to Remote-2 router
ip address 192.168.1.21 255.255.255.252
ip ospf 1 area 3
no shut
router ospf 1
passive-interface GigabitEthernet2/0
passive-interface Loopback0
Step 2:
Enable OSPF on router connected interfaces of Remote-1 and Remote-2 with global configuration method. Configure passive interfaces on LAN segments and loopback interfaces. Advertise all LAN segments and loopback interfaces to neighbors.
Remote-1
interface Loopback0
description Management Interface
ip address 192.168.255.5 255.255.255.255
interface GigabitEthernet1/0/1
description link to R3 router
no switchport
ip address 192.168.1.18 255.255.255.252
no shut
router ospf 1
passive-interface Loopback0
passive-interface Vlan10
passive-interface Vlan11
passive-interface Vlan12
network 172.16.0.0 0.0.255.255 area 2
network 192.168.1.16 0.0.0.3 area 2
network 192.168.255.5 0.0.0.0 area 2
Remote-2
interface Loopback0
description Management Interface
ip address 192.168.255.6 255.255.255.255
interface GigabitEthernet0/0/0
description link to INET-1 router
ip address 192.168.1.22 255.255.255.252
no shut
interface GigabitEthernet0/0/1
description LAN (172.16.2.0/26)
ip address 172.16.2.62 255.255.255.192
no shut
router ospf 1
passive-interface default
no passive-interface GigabitEthernet0/0/0
network 172.16.2.0 0.0.0.63 area 3
network 192.168.1.20 0.0.0.3 area 3
network 192.168.255.6 0.0.0.0 area 3
Step 3:
Configure OSPF point-to-point network type on all WAN interfaces assigned to area 0. This will prevent DR/BDR election and speed convergence for WAN links.
R1
interface GigabitEthernet0/0/1
ip ospf network point-to-point
interface GigabitEthernet0/0/2
ip ospf network point-to-point
R3
interface GigabitEthernet0/0/0
ip ospf network point-to-point
interface GigabitEthernet0/0/1
ip ospf network point-to-point
INET-1
interface GigabitEthernet0/0
ip ospf network point-to-point
interface GigabitEthernet1/0
ip ospf network point-to-point
Step 4:
Configure Remote-1 and Remote-2 routers as OSPF stub areas to reduce the size of OSPF link state database of routers.
Remote-1
router ospf 1
area 2 stub
R3
router ospf 1
area 2 stub
Remote-2
router ospf 1
area 3 stub
INET-1
router ospf 1
area 3 stub
Step 5:
Advertise a default route from INET-1 to all downstream neighbors for internet access.
INET-1
ip route 0.0.0.0 0.0.0.0 172.33.1.2
router ospf 1
default-information originate
Step 6:
Verify neighbor adjacencies, routing tables, network type, stub areas, and connectivity.
show ip ospf neighbor (R1, INET-1, R3)
show ip route (R1, INET-1, R3)
show ip protocols (R1)
show ip ospf interface brief (R1, INET-1, Remote-1)
show ip ospf interface (R1, INET-1, Remote-1)
ping 172.16.2.1 (LAN-2)
ping 172.33.1.2 (ISP)
ping 172.16.10.254 (Remote-1)
ping 172.16.11.254 (Remote-1)
ping 172.16.12.254 (Remote-1)