OSPF Stub Area Filtering - Learn Cisco

Post Top Ad

OSPF Stub Area Filtering



Task 1
On R2 Remove the configuration from previous labs as follows:

R2 Config:
!
no ip route 1.1.1.1 255.255.255.255 Null0 track 1
no ip route 10.0.8.8 255.255.255.255 172.16.28.8
!
no ip prefix-list FAKE_NETWORK seq 5 permit 1.1.1.1/32
!
no ip route 1.1.1.1 255.255.255.255 Null0 track 1
no ip route 10.0.8.8 255.255.255.255 172.16.28.8
!
no track 1 rtr 1
!
router ospf 1
 no default-information originate always route-map TRACK_FAKE_NETWORK
!

On SW2:
!
no ip route 10.0.0.0 255.255.0.0 172.16.28.2
no ip route 172.16.0.0 255.255.0.0 172.16.28.2
!

Task 2
Configure the following loopbacks on R1 and advertise them into OSPF area 0 as E2 types (external type-2).
  • Loopback1: 192.168.1.1/28
  • Loopback1: 192.168.1.17/28
  • Loopback1: 192.168.1.33/28
  • Loopback1: 192.168.1.49/28
Task 3
Configure OSPF area 28 between R2 and SW2 (as per topology shown above). Advertise SW2 Loopback0 into OSPF area 28. Ensure that routers in area 28 do not learn any external prefixes (LSA5) but have connectivity to those. Do not use any filtering mechanism such as ACL, prefix-list, etc. to accomplish the task.


Questions
Try to answer the following questions:
  1. What are OSPF area types?
  2. What does OSPF stub area do?
Lab Solution

Solution configuration can be accessed below; solution contains task 1 and task 2 (if you want to save it, click the link, then go to File-->Download):
https://drive.google.com/file/d/0BwE5C95tpjZORlREb0E0MnVaVlk/edit?usp=sharing

Task 1
Completed above.

Task 2
Configure the following loopbacks on R1 and advertise them into OSPF area 0 as E2 types (external type-2).
  • Loopback1: 192.168.1.1/28
  • Loopback1: 192.168.1.17/28
  • Loopback1: 192.168.1.33/28
  • Loopback1: 192.168.1.49/28
R1 Config:
!
interface Loopback0
 ip address 10.0.1.1 255.255.255.255
!
interface Loopback1
 ip address 192.168.1.1 255.255.255.240
!
interface Loopback2
 ip address 192.168.1.17 255.255.255.240
!
interface Loopback3
 ip address 192.168.1.33 255.255.255.240
!
interface Loopback4
 ip address 192.168.1.49 255.255.255.240
!
ip prefix-list LOOPBACKS permit 192.168.1.0/16 ge 28
!
route-map CONN_TO_OSPF permit 10
 match ip address prefix-list LOOPBACKS
!
router ospf 1
 redistribute connected subnets route-map CONN_TO_OSPF
!

Pic. 2 - LSA5 Advertised by R1.


Task 3
Configure OSPF area 28 between R2 and SW2 (as per topology shown above). Advertise SW2 Loopback0 into OSPF area 28. Ensure that routers in area 28 do not learn any external prefixes (LSA5) but have connectivity to those. Do not use any filtering mechanism such as ACL, prefix-list, etc. to accomplish the task.

Pic. 3 - SW2 Routing Table Before Stub Network Configuration.


R2 Config:
!
router ospf 1
 network 172.16.28.2 0.0.0.0 area 28
!

SW2 Config:
!
router ospf 1
 log-adjacency-changes
 network 10.0.8.8 0.0.0.0 area 28
 network 172.16.28.8 0.0.0.0 area 28
!

In order to filter out External prefixes the following must be added:

R2 Config:
!
router ospf 1
 area 28 stub
!

SW2
!
router ospf 1
 area 28 stub
!
Pic. 4 - Area 28 Stub.

Notice!
External prefixes are no longer present in the routing table. ABR (R2) injects the default route automatically to ensure the connectivity to the external prefixes.

Study Drill

There are three major types of OSPF areas:


  • Normal (default).
  • Stub (filters LSA5; ABR injects default route to provide reachability to filtered networks).
  • Not-So-Stubby (NSSA; filtering LSA5 but allowing redistribution into OSPF).


Post Top Ad