Tuesday, February 28, 2023

OSPF LAB - NSSA/Totally NSSA Area

Now let continue further on the previous network lab from OSPF LAB – Stub/Totally Stub Area.
We will now perform some static route redistribution and see how its work.

On each router, we will create a loopback interface with the following address 66.XX.1.1/16, where XX is your router number as:

R1 – 66.1.1.1/16
R2 – 66.2.1.1/16
R3 – 66.3.1.1/16
R4 – 66.4.1.1/16
R5 – 66.5.1.1/16
R6 – 66.6.1.1/16
R7 – 66.7.1.1/16
R8 – 66.8.1.1/16
R9 – 66.9.1.1/16
R10 – 66.10.1.1/16
R11 – 66.11.1.1/16

Also, will create static routes on each router to the following networks - 77.XX.0.0/24, 77.XX.1.0/24, 77.XX.2.0/24, 77.XX.3.0/24,  and set a next hop of 66.XX.1.2.
And then redistribute these static routes in the OSPF process

Configuration for R1
configure terminal
interface loopback1
ip address 66.1.1.1 255.255.0.0
exit
!
ip route 77.1.0.0 255.255.255.0 66.1.1.2
ip route 77.1.1.0 255.255.255.0 66.1.1.2
ip route 77.1.2.0 255.255.255.0 66.1.1.2
ip route 77.1.3.0 255.255.255.0 66.1.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

Configuration for R2
configure terminal
interface loopback1
ip address 66.2.1.1 255.255.0.0
exit
!
ip route 77.2.0.0 255.255.255.0 66.2.1.2
ip route 77.2.1.0 255.255.255.0 66.2.1.2
ip route 77.2.2.0 255.255.255.0 66.2.1.2
ip route 77.2.3.0 255.255.255.0 66.2.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

Configuration for R3
configure terminal
interface loopback1
ip address 66.3.1.1 255.255.0.0
exit
!
ip route 77.3.0.0 255.255.255.0 66.3.1.2
ip route 77.3.1.0 255.255.255.0 66.3.1.2
ip route 77.3.2.0 255.255.255.0 66.3.1.2
ip route 77.3.3.0 255.255.255.0 66.3.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr 

Configuration for R4
configure terminal
interface loopback1
ip address 66.4.1.1 255.255.0.0
exit
!
ip route 77.4.0.0 255.255.255.0 66.4.1.2
ip route 77.4.1.0 255.255.255.0 66.4.1.2
ip route 77.4.2.0 255.255.255.0 66.4.1.2
ip route 77.4.3.0 255.255.255.0 66.4.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

Configuration for R5
configure terminal
interface loopback1
ip address 66.5.1.1 255.255.0.0
exit
!
ip route 77.5.0.0 255.255.255.0 66.5.1.2
ip route 77.5.1.0 255.255.255.0 66.5.1.2
ip route 77.5.2.0 255.255.255.0 66.5.1.2
ip route 77.5.3.0 255.255.255.0 66.5.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

Configuration for R6
configure terminal
interface loopback1
ip address 66.6.1.1 255.255.0.0
exit
!
ip route 77.6.0.0 255.255.255.0 66.6.1.2
ip route 77.6.1.0 255.255.255.0 66.6.1.2
ip route 77.6.2.0 255.255.255.0 66.6.1.2
ip route 77.6.3.0 255.255.255.0 66.6.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

Configuration for R7
configure terminal
interface loopback1
ip address 66.7.1.1 255.255.0.0
exit
!
ip route 77.7.0.0 255.255.255.0 66.7.1.2
ip route 77.7.1.0 255.255.255.0 66.7.1.2
ip route 77.7.2.0 255.255.255.0 66.7.1.2
ip route 77.7.3.0 255.255.255.0 66.7.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr 

Configuration for R8
configure terminal
interface loopback1
ip address 66.8.1.1 255.255.0.0
exit
!
ip route 77.8.0.0 255.255.255.0 66.8.1.2
ip route 77.8.1.0 255.255.255.0 66.8.1.2
ip route 77.8.2.0 255.255.255.0 66.8.1.2
ip route 77.8.3.0 255.255.255.0 66.8.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr 

Configuration for R9
configure terminal
interface loopback1
ip address 66.9.1.1 255.255.0.0
exit
!
ip route 77.9.0.0 255.255.255.0 66.9.1.2
ip route 77.9.1.0 255.255.255.0 66.9.1.2
ip route 77.9.2.0 255.255.255.0 66.9.1.2
ip route 77.9.3.0 255.255.255.0 66.9.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

Configuration for R10
configure terminal
interface loopback1
ip address 66.10.1.1 255.255.0.0
exit
!
ip route 77.10.0.0 255.255.255.0 66.10.1.2
ip route 77.10.1.0 255.255.255.0 66.10.1.2
ip route 77.10.2.0 255.255.255.0 66.10.1.2
ip route 77.10.3.0 255.255.255.0 66.10.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

Configuration for R11
configure terminal
interface loopback1
ip address 66.11.1.1 255.255.0.0
exit
!
ip route 77.11.0.0 255.255.255.0 66.11.1.2
ip route 77.11.1.0 255.255.255.0 66.11.1.2
ip route 77.11.2.0 255.255.255.0 66.11.1.2
ip route 77.11.3.0 255.255.255.0 66.11.1.2
!
router ospf 1
redistribute static subnets
exit
!
end
wr

But now  if we see the routing table in Area 123, Area 8, Area 56, and Area 10 we don’t see the static route is redistributed.
As in stub area, redistribution is not allowed, which means type 4 and 5 are not allowed.
So, if we want redistribution, we need to convert stub area to normal area or NSSA area.
As in NSSA area, we will have Type 7 LSA which will carry external redistributed routes.

So, as Area 123 and Area 8 are Totally Stub area, we will convert them to Totally NSSA Area.
And Area 56 and Area 10 are Stub area, we will convert them to NSSA Area.

For Area 123
Router R1, R2 and R3 configuration
configure terminal
router ospf 1
no area 123 stub no-summary
no area 123 stub
area 123 nssa no-summary
exit
!
end
wr

For Area 8
Router R7 and R8 configuration
configure terminal
router ospf 1
no area 8 stub no-summary
no area 8 stub
area 8 nssa no-summary
exit
!
end
wr

For Area 56
Router R4, R5 and R6 configuration
configure terminal
router ospf 1
no area 56 stub
area 56 nssa
exit
!
end
wr

For Area 10
Router R9, R10 and R11 configuration
configure terminal
router ospf 1
no area 10 stub
area 10 nssa
exit
!
end
wr

Now, suppose when we check the routing  table  for R1 of Area 1, for the local route redistributed we will see routes as N2, and in OSPF database we will see Type-7 LSA database

R1#show  ip ospf database | begin Type-7
                Type-7 AS External Link States (Area 123)
 
Link ID         ADV Router      Age         Seq#       Checksum Tag
77.1.0.0        1.1.1.1         460         0x80000001 0x006ED1 0
77.1.1.0        1.1.1.1         460         0x80000001 0x0063DB 0
77.1.2.0        1.1.1.1         460         0x80000001 0x0058E5 0
77.1.3.0        1.1.1.1         460         0x80000001 0x004DEF 0
77.2.0.0        2.2.2.2         455         0x80000001 0x0076C0 0
77.2.1.0        2.2.2.2         455         0x80000001 0x006BCA 0
77.2.2.0        2.2.2.2         455         0x80000001 0x0060D4 0
77.2.3.0        2.2.2.2         455         0x80000001 0x0055DE 0
77.3.0.0        3.3.3.3         449         0x80000001 0x0060E1 0
77.3.1.0        3.3.3.3         449         0x80000001 0x0055EB 0
77.3.2.0        3.3.3.3         449         0x80000001 0x004AF5 0
77.3.3.0        3.3.3.3         449         0x80000001 0x003FFF 0
R1#

But for same above route in Area 0 of router R4, we will see as E2 routes, and in OSPF database we will have Type-5 database for those routes with advertising router as ABR router.
As ABR router of Area 123, have converted Type-7 LSA to Type-5 LSA

R4#show  ip route 77.2.2.0
Routing entry for 77.2.2.0/24
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 66
  Last update from 192.168.34.0 on Serial2/0, 00:02:09 ago
  Routing Descriptor Blocks:
  * 192.168.34.0, from 3.3.3.3, 00:02:09 ago, via Serial2/0
      Route metric is 20, traffic share count is 1
R4#

Ensure  all networks are reachable

R1#ping 11.11.11.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 136/144/160 ms
R1#
R1#traceroute 8.8.8.8
Type escape sequence to abort.
Tracing the route to 8.8.8.8
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.13.1 24 msec 24 msec 32 msec
  2 192.168.34.1 56 msec 28 msec 52 msec
  3 192.168.47.1 100 msec 116 msec 92 msec
  4 192.168.78.1 136 msec 92 msec 136 msec
R1#

R6#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/101/148 ms
R6#
R6#traceroute 10.10.10.10
Type escape sequence to abort.
Tracing the route to 10.10.10.10
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.56.0 24 msec 40 msec 24 msec
  2 192.168.45.0 32 msec 52 msec 56 msec
  3 192.168.47.1 88 msec 84 msec 68 msec
  4 192.168.79.1 132 msec 124 msec 96 msec
  5 192.168.109.1 132 msec 132 msec 120 msec
R6#

No comments:

Post a Comment