Thursday, February 20, 2020

How to configure OSPF Totally Stub Area

In the first lesson I gave an overview of the different OSPF special area types. I also covered the OSPF stub area and now it’s time to demonstrate the totally stub area.  This is the network topology that we will use:
ospf stub area
Above you see two areas, 0 and 1. This is the configuration that we will use:
R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config-router)#redistribute connected subnets
R2(config)#router ospf 1
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2(config-router)#network 192.168.23.0 0.0.0.255 area 1
R3(config)#router ospf 1
R3(config-router)#network 192.168.23.0 0.0.0.255 area 1
All the networks are advertised in the correct OSPF areas with the exception of the loopback0 interface on R1. We will redistribute it so it becomes a LSA type 5. Let’s take a look at the routing table of R3:
R3#show ip route ospf 
O IA 192.168.12.0/24 [110/2] via 192.168.23.2, 00:08:53, FastEthernet0/0
     1.0.0.0/24 is subnetted, 1 subnets
O E2    1.1.1.0 [110/20] via 192.168.23.2, 00:01:16, FastEthernet0/0
Above you see network 192.168.12.0 /24 (LSA Type 3) and 1.1.1.0 /24 (LSA Type 5). Let’s change the area to the “normal” stub area first:
R2(config)#router ospf 1
R2(config-router)#area 1 stub
R3(config)#router ospf 1
R3(config-router)#area 1 stub
This is how you change it into a stub area. Now let’s see what has changed:
R3#show ip route ospf 
O IA 192.168.12.0/24 [110/2] via 192.168.23.2, 00:00:42, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 192.168.23.2, 00:00:42, FastEthernet0/0
The stub area blocks LSA type 5 so you don’t see network 1.1.1.0 /24 anymore. It creates a default route so that we can get out of the area however.
What about the totally stub area? Let me show you!
R2(config)#router ospf 1
R2(config-router)#area 1 stub no-summary
You only have to configure this on the ABR, we don’t have to make any changes to R3.
You only have to use “stub no-summary” on the ABR. All other routers in the totally stub area only require the “stub” command.
R3#show ip route ospf 
O*IA 0.0.0.0/0 [110/2] via 192.168.23.2, 00:02:27, FastEthernet0/0
Now we only have a default route. LSA Type 3 and 5 are both blocked.
hostname R2
!
interface FastEthernet0/0
 ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet1/0
 ip address 192.168.23.2 255.255.255.0
!
router ospf 1
 area 1 stub no-summary
 network 192.168.12.0 0.0.0.255 area 0
 network 192.168.23.0 0.0.0.255 area 1
!
end
hostname R1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
!
router ospf 1
 redistribute connected subnets
 network 192.168.12.0 0.0.0.255 area 0
!
end
hostname R3
!
interface FastEthernet0/0
 ip address 192.168.23.3 255.255.255.0
!
router ospf 1
 area 1 stub
 network 192.168.23.0 0.0.0.255 area 1
!
end

No comments:

Post a Comment