Type of areas in OSPF - LAB











Configuring Routing protocol


A#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
A(config)#router ospf 1
A(config-router)#network 1.1.1.0 0.0.0.255 area 1
A(config-router)#network 200.100.1.0 0.0.0.255 area 1
A(config-router)#^Z
A#
*Mar  1 15:56:56.207: %SYS-5-CONFIG_I: Configured from console by console

B(config)#router ospf 1
B(config-router)#network 200.100.2.0 0.0.0.255 area 1
B(config-router)#network 2.1.1.0 0.0.0.255 area 0
B(config-router)#network 1.1.1.0 0.0.0.255 area 1
B(config-router)#
*Mar  1 15:58:30.903: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
B(config-router)#^Z
B#
*Mar  1 15:58:33.227: %SYS-5-CONFIG_I: Configured from console by console
OSPF Neighbor relationship is established and OSPF is in full state.


C#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
C(config)#router ospf 1
C(config-router)#network 2.1.1.0 0.0.0.255 area 0
C(config-router)#
*Mar  1 16:00:27.255: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.2.1 on FastEthernet0/1 from LOADING to FULL, Loading Done
C(config-router)#network 200.100.3.0 0.0.0.255 area 2
C(config-router)#exit
C(config)#ip route 192.168.50.0 255.255.255.0 null 0
C(config)#ip route 192.168.51.0 255.255.255.0 null 0
C(config)#ip route 192.168.52.0 255.255.255.0 null 0
C(config)#ip route 192.168.53.0 255.255.255.0 null 0
C(config-router)#^Z
C#
*Mar  1 16:00:46.875: %SYS-5-CONFIG_I: Configured from console by console
Another neighbor relationship is established and OSPF is in full state.


Verification of OSPF configuration

A#show ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 1.1.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    1.1.1.0 0.0.0.255 area 1
    200.100.1.0 0.0.0.255 area 1
  Routing Information Sources:
    Gateway         Distance      Last Update
    200.100.2.1          110      00:05:22
  Distance: (default is 110)

B#show ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 200.100.2.1
  It is an area border router
  Number of areas in this router is 2. 2 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    1.1.1.0 0.0.0.255 area 1
    2.1.1.0 0.0.0.255 area 0
    200.100.2.0 0.0.0.255 area 1
  Routing Information Sources:
    Gateway         Distance      Last Update
    200.100.3.1          110      00:07:11
  Distance: (default is 110)



C#show ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 200.100.3.1
  It is an area border router
  Number of areas in this router is 2. 2 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    2.1.1.0 0.0.0.255 area 0
    200.100.3.0 0.0.0.255 area 2
  Routing Information Sources:
    Gateway         Distance      Last Update
    200.100.2.1          110      00:08:37
  Distance: (default is 110)


Check Routing table on A



A#show ip route
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

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:13:50, FastEthernet0/0
O     200.100.2.0/24 [110/2] via 1.1.1.2, 00:13:50, FastEthernet0/0
O IA  200.100.3.0/24 [110/3] via 1.1.1.2, 00:11:27, FastEthernet0/0

It’s like they are coming from outside of our autonomous system, just like we advertise rip or any other routing protocol, we’ll have to redistribute these routes in OSPF.

We can see LSA 1, 2, 3, 4 but LSA 5 “OE” (static routes – 50, 51, 52, 53) are still not here in our routing table.

Redistributing Static Routes

C(config)#router ospf 1
C(config-router)#redistribute static subnets
C(config-router)#^Z
C#
*Mar  1 16:17:16.383: %SYS-5-CONFIG_I: Configured from console by console

Always include “subnet” in your command, so that sub-netted IP’s including class-full and classless IP’s are redistributed.


Verifying the impact on Routing table

A#show ip route
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
       *****OUTPUT OMITTED*****

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:19:32, FastEthernet0/0
O E2  192.168.50.0/24 [110/20] via 1.1.1.2, 00:00:43, FastEthernet0/0
O E2  192.168.51.0/24 [110/20] via 1.1.1.2, 00:00:43, FastEthernet0/0
O E2  192.168.52.0/24 [110/20] via 1.1.1.2, 00:00:43, FastEthernet0/0
O E2  192.168.53.0/24 [110/20] via 1.1.1.2, 00:00:43, FastEthernet0/0
O     200.100.2.0/24 [110/2] via 1.1.1.2, 00:19:32, FastEthernet0/0
O IA  200.100.3.0/24 [110/3] via 1.1.1.2, 00:17:09, FastEthernet0/0


B#show ip route
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
       *****OUTPUT OMITTED*****

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
O E2  192.168.50.0/24 [110/20] via 2.1.1.2, 00:04:12, FastEthernet0/1
O E2  192.168.51.0/24 [110/20] via 2.1.1.2, 00:04:12, FastEthernet0/1
O E2  192.168.52.0/24 [110/20] via 2.1.1.2, 00:04:12, FastEthernet0/1
O E2  192.168.53.0/24 [110/20] via 2.1.1.2, 00:04:12, FastEthernet0/1
      200.100.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.2.0/24 is directly connected, FastEthernet1/0
L        200.100.2.1/32 is directly connected, FastEthernet1/0
O IA  200.100.3.0/24 [110/2] via 2.1.1.2, 00:20:40, FastEthernet0/1
Now we’ll make area 1 stub area so that we can block external LSA (LSA 5)



Not every area can be a stub area.
There are many conditions in which we cannot make an area stub, like
  • Backbone area cannot be stub area
  • Area in which we’ve made a virtual link


Verify

B(config)#router ospf 1
B(config-router)#area 0 stub
% OSPF: Backbone can not be configured as stub area

Backbone can never have single exit point; backbone is a place where the world is terminated. It’s very much logical


While making an area stub, a mistake that usually people make is, they just go to ABR and give command “area x stub” which is wrong if you want to make an area stub you’ll have to go to every single router in this area to configure it as stub.



Configure area as stub


B(config)#router ospf 1
B(config-router)#area 1 stub
B(config-router)#
*Mar  1 16:27:55.495: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
B(config-router)#^Z
B#
*Mar  1 16:27:58.395: %SYS-5-CONFIG_I: Configured from console by console

You can see after configuring area 1 as stub, adjacency is forced to reset and ospf state has been changed from full to down.




If we verify it on router A, even there you can see the same status


A#
*Mar  1 16:28:30.699: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.2.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
A#
Now if you verify the routing table on router A, you cannot see any entry brought by OSPF

A#show  ip route
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

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0

Now let’s configure area 1 stub on router A also

A#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
A(config)#router ospf 1
A(config-router)#area 1 stub
A(config-router)#
*Mar  1 16:31:57.843: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.2.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
A(config-router)#^Z
A#
*Mar  1 16:32:05.295: %SYS-5-CONFIG_I: Configured from console by console

You can see after configuring area 1 as stub neighbor relationship is established immediately and OSPF loading is in full state.


Verification of Routing Table

A#show ip route
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 1.1.1.2 to network 0.0.0.0
O*IA  0.0.0.0/0 [110/2] via 1.1.1.2, 00:01:54, FastEthernet0/0
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:01:54, FastEthernet0/0
O     200.100.2.0/24 [110/2] via 1.1.1.2, 00:01:54, FastEthernet0/0
O IA  200.100.3.0/24 [110/3] via 1.1.1.2, 00:01:54, FastEthernet0/0


You can see there’s no LSA 5 (External) LSA in our routing table and you can see that a default static route is injected in our routing table, so it’s not security but it’s verified that the routing table size is minimized



You can still see LSA 5 on router B, as discussed earlier, router is not stub as a whole, area is stub, so let’s verify


Verification


B#show ip route
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

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
O E2  192.168.50.0/24 [110/20] via 2.1.1.2, 00:16:18, FastEthernet0/1
O E2  192.168.51.0/24 [110/20] via 2.1.1.2, 00:16:18, FastEthernet0/1
O E2  192.168.52.0/24 [110/20] via 2.1.1.2, 00:16:18, FastEthernet0/1
O E2  192.168.53.0/24 [110/20] via 2.1.1.2, 00:16:18, FastEthernet0/1
      200.100.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.2.0/24 is directly connected, FastEthernet1/0
L        200.100.2.1/32 is directly connected, FastEthernet1/0
O IA  200.100.3.0/24 [110/2] via 2.1.1.2, 00:16:18, FastEthernet0/1
You can see LSA 5 still in routing table of router B


Now configuring Totally stub area


In totally stub area, LSA 5 is definitely filtered along with that LSA 3 and 4 (Summary LSA – which is originated by ABR) are also filtered to enter your area, so it’s not necessary to go on all routers, just go to ABR from where they are originating and give command of totally stubby area.


It is sufficient to configure totally stubby area only on ABR, because LSA 3, 4 are originated by ABR, so let's verify it practically


Routing table of Router A right now

A#show ip route
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 1.1.1.2 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 1.1.1.2, 00:13:43, FastEthernet0/0
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:13:43, FastEthernet0/0
O     200.100.2.0/24 [110/2] via 1.1.1.2, 00:13:43, FastEthernet0/0
O IA  200.100.3.0/24 [110/3] via 1.1.1.2, 00:13:43, FastEthernet0/0
You can see LSA 3 and 4 are there


Configuring area 1 as, totally stub

B(config)#router ospf 1
B(config-router)#area 1 stub no-summary
B(config-router)#^Z
B#
*Mar  1 16:49:25.947: %SYS-5-CONFIG_I: Configured from console by console

“Area 1 stub” command will stop external LSA (LSA 5), and “no summary” command will stop summary LSA (LSA 3, 4)



Verify impact on routing table

A#show ip route
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 1.1.1.2 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 1.1.1.2, 00:01:20, FastEthernet0/0
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
O     200.100.2.0/24 [110/2] via 1.1.1.2, 00:18:30, FastEthernet0/0

You can see that there’s no LSA 3, 4 or 5, and a default route is injected for LSA 3, 4
Once again, there’s no security but if you say that you’ve managed (reduced) you routing table size, then it’s true.


If you undo configurations of “totally stub area” it will go back only one step, mans it will become stub it won’t become a standard area in one go.

Undo "Totally stub area" configuration

B#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
B(config)#router ospf 1
B(config-router)#area 1 stub no-summary
B(config-router)#^Z
B#
*Mar  1 16:55:18.355: %SYS-5-CONFIG_I: Configured from console by console


Verify impact on routing table

A#show ip route
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 1.1.1.2 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 1.1.1.2, 00:01:06, FastEthernet0/0
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:00:07, FastEthernet0/0
O     200.100.2.0/24 [110/2] via 1.1.1.2, 00:01:06, FastEthernet0/0
O IA  200.100.3.0/24 [110/3] via 1.1.1.2, 00:00:07, FastEthernet0/0

You can see LSA 3 and 4, but LSA 5 is not there so it means area 1 went back from totally stubby to stub, it didn’t go all the way back to a regular OSPF area.
Be careful if you want to undo totally stub configurations to make it standard area, you’ll have to undo settings two times.


Verification

A#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
A(config)#router ospf 1
A(config-router)#no area 1 stub
A(config-router)#^Z
A#
*Mar  1 17:01:49.807: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.2.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
*Mar  1 17:01:50.807: %SYS-5-CONFIG_I: Configured from console by console


Now check log message on B too


B#
*Mar  1 17:02:41.971: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired


Undo stub configuration on B too
B#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
B(config)#router ospf 1
B(config-router)#no area 1 stub
B(config-router)#^Z
B#
*Mar  1 17:08:29.851: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
*Mar  1 17:08:30.011: %SYS-5-CONFIG_I: Configured from console by console

Now you can see neighbor relationship has been established and loading is done and OSPF state is full immediately after matching the configuration on both side.


Now verify impact on routing table of A


A# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
---Output Omitted---
Gateway of last resort is not set
C    1.0.0.0/8 is directly connected, Serial1/0
O IA 2.0.0.0/8 [110/96] via 1.1.1.2, 00:03:55, Serial1/0
C    200.100.50.0/24 is directly connected, FastEthernet0/0
O    200.100.100.0/24 [110/49] via 1.1.1.2, 00:03:55, Serial1/0
O E2 192.1.65.0/24 [110/20] via 1.1.1.2, 00:03:55, Serial1/0
O E2 192.1.66.0/24 [110/20] via 1.1.1.2, 00:03:55, Serial1/0
O E2 192.1.67.0/24 [110/20] via 1.1.1.2, 00:03:55, Serial1/0
O IA 200.100.150.0/24 [110/97] via 1.1.1.2, 00:03:55, Serial1/0
O E2 192.1.68.0/24 [110/20] via 1.1.1.2, 00:03:55, Serial1/0

Now we can see LSA 3, 4 and 5 all of them are once again in our routing table, because we’ve removed configuration of stub and totally stubby area.


Not So Stubby Area - NSSA

Making Router A ASBR


A(config)#ip route 192.168.11.0 255.255.255.0 null 0
A(config)#ip route 192.168.12.0 255.255.255.0 null 0
A(config)#ip route 192.168.13.0 255.255.255.0 null 0
A(config)#ip route 192.168.14.0 255.255.255.0 null 0

Now Router A and C are ASBR and we want to make area 1 NSSA


A(config)#router ospf 1
A(config-router)#redistribute static subnets


Verify if LSA 5 from both ASBRs are in Routing table of B

B#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
*****OUTPUT OMITTED*****
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
O E2  192.168.11.0/24 [110/20] via 1.1.1.1, 00:00:32, FastEthernet0/0
O E2  192.168.12.0/24 [110/20] via 1.1.1.1, 00:00:32, FastEthernet0/0
O E2  192.168.13.0/24 [110/20] via 1.1.1.1, 00:00:32, FastEthernet0/0
O E2  192.168.14.0/24 [110/20] via 1.1.1.1, 00:00:32, FastEthernet0/0
O E2  192.168.50.0/24 [110/20] via 2.1.1.2, 00:02:43, FastEthernet0/1
O E2  192.168.51.0/24 [110/20] via 2.1.1.2, 00:02:43, FastEthernet0/1
O E2  192.168.52.0/24 [110/20] via 2.1.1.2, 00:02:43, FastEthernet0/1
O E2  192.168.53.0/24 [110/20] via 2.1.1.2, 00:02:43, FastEthernet0/1
O     200.100.1.0/24 [110/2] via 1.1.1.1, 00:02:24, FastEthernet0/0
      200.100.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.2.0/24 is directly connected, FastEthernet1/0
L        200.100.2.1/32 is directly connected, FastEthernet1/0
O IA  200.100.3.0/24 [110/2] via 2.1.1.2, 00:02:43, FastEthernet0/1

Green
= Internal ASBR                 Cyan = External ASBR


You can see that LSA 5 from both ASBR, internal and external are in routing table. 



Now lets configure area 1 as NSSA


A#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
A(config)#router ospf 1
A(config-router)#area 1 nssa
A(config-router)#^Z
A#
*Mar  5 11:45:51.855: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.2.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset

*Mar  5 11:45:32.727: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
B#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
B(config)#router ospf 1
B(config-router)#area 1 nssa
B(config-router)#^Z
B#
*Mar  5 11:45:51.187: %SYS-5-CONFIG_I: Configured from console by console
*Mar  5 11:45:51.927: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done


A#
*Mar  5 11:46:49.571: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.2.1 on FastEthernet0/0 from LOADING to FULL, Loading Done


Verify Impact on routing table of A

A#show ip route
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

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:01:08, FastEthernet0/0
S     192.168.11.0/24 is directly connected, Null0
S     192.168.12.0/24 is directly connected, Null0
S     192.168.13.0/24 is directly connected, Null0
S     192.168.14.0/24 is directly connected, Null0
      200.100.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.1.0/24 is directly connected, FastEthernet1/0
L        200.100.1.1/32 is directly connected, FastEthernet1/0
O     200.100.2.0/24 [110/2] via 1.1.1.2, 00:01:08, FastEthernet0/0
O IA  200.100.3.0/24 [110/3] via 1.1.1.2, 00:01:08, FastEthernet0/0


Now you can see “O” and “O IA” routes but there’s no external LSA 5 “O E”, Default route is not injected in this case, if you want to inject default route there’s a command “default-information-originate” you’ll have to give this command
A(config-router)#area 1 nssa default-information-originate








B#show ip route
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
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
O N2  192.168.11.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O N2  192.168.12.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O N2  192.168.13.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O N2  192.168.14.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O E2  192.168.50.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O E2  192.168.51.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O E2  192.168.52.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O E2  192.168.53.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O     200.100.1.0/24 [110/2] via 1.1.1.1, 00:03:55, FastEthernet0/0
      200.100.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.2.0/24 is directly connected, FastEthernet1/0
L        200.100.2.1/32 is directly connected, FastEthernet1/0
O IA  200.100.3.0/24 [110/2] via 2.1.1.2, 00:04:05, FastEthernet0/1


Verify Impact on routing table of B


B#show ip route
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
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
O N2  192.168.11.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O N2  192.168.12.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O N2  192.168.13.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O N2  192.168.14.0/24 [110/20] via 1.1.1.1, 00:03:55, FastEthernet0/0
O E2  192.168.50.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O E2  192.168.51.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O E2  192.168.52.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O E2  192.168.53.0/24 [110/20] via 2.1.1.2, 00:04:05, FastEthernet0/1
O     200.100.1.0/24 [110/2] via 1.1.1.1, 00:03:55, FastEthernet0/0
      200.100.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.2.0/24 is directly connected, FastEthernet1/0
L        200.100.2.1/32 is directly connected, FastEthernet1/0
O IA  200.100.3.0/24 [110/2] via 2.1.1.2, 00:04:05, FastEthernet0/1
Here you can see that LSA 5 originated by our own ASBR appear as “ON” (encapsulated as LSA 7) but the LSA 5 from external LSA appear as “OE”


Now at the border LSA 7 Encapsulation will be removed and they will appear as LSA 5 to the external world, now let’s verify it on C.


C#show ip route
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

      1.0.0.0/24 is subnetted, 1 subnets
O IA     1.1.1.0 [110/2] via 2.1.1.1, 00:08:18, FastEthernet0/1
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.2/32 is directly connected, FastEthernet0/1
O E2  192.168.11.0/24 [110/20] via 2.1.1.1, 00:06:59, FastEthernet0/1
O E2  192.168.12.0/24 [110/20] via 2.1.1.1, 00:06:59, FastEthernet0/1
O E2  192.168.13.0/24 [110/20] via 2.1.1.1, 00:06:59, FastEthernet0/1
O E2  192.168.14.0/24 [110/20] via 2.1.1.1, 00:06:59, FastEthernet0/1
S     192.168.50.0/24 is directly connected, Null0
S     192.168.51.0/24 is directly connected, Null0
S     192.168.52.0/24 is directly connected, Null0
S     192.168.53.0/24 is directly connected, Null0
O IA  200.100.1.0/24 [110/3] via 2.1.1.1, 00:07:01, FastEthernet0/1
O IA  200.100.2.0/24 [110/2] via 2.1.1.1, 00:08:19, FastEthernet0/1
      200.100.3.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.3.0/24 is directly connected, FastEthernet1/0
L        200.100.3.1/32 is directly connected, FastEthernet1/0
Here you can see that LSA 7 encapsulation has been removed and they appeared as LSA 5 to the external world means outside the area.




You can’t see the external LSA 5 on Router B, but they are not on router A they are not discarded at router B because routing table on ASBR is never reduced it’s only reduced inside the area.


You’ve seen the down state of OSPF; although the OSPF is running but only some configurations are mismatched (some flags are mismatched)


For any correction, improvement or suggestion please do not hesitate to reach out at usman@cyberswats.com


Post a Comment

0 Comments