FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
jalanisrocha
Staff
Staff
Article Id 194927

Description
Stub areas are helpful to optimize resource utilization on some routers with low capacity or in cases that other areas don’t need to learn all the routes from the backbone area. The special areas to achieve this goal are:

Stub: Allow routes in the LSDB (Link-State Database) from the Stub area to be advertised to the Backbone area (0), whereas inter-area routes from the area 0 to the stub area will pass, external routes will be filtered; a default route will be advertised to it instead.


Totally Stubby area: Similar to stub areas, but external and inter-area routes will be filtered while passing from area 0, a default route will be advertised to it instead.


NSSA (Not-so-stubby area): Similar to the stub area, however it gives the possibility to have an ASBR on it and advertise external routes from this area to area 0. inter-area routes from the area 0 to the stub area will pass, external routes will be filtered; a default route will be advertised to it instead.


Totally NSSA: Similar to NSSA areas, but external and inter-area routes will be filtered while passing from area 0 to it, a default route will be advertised to it instead.

This article describes how to configure OSPF Stub, Totally Stub, NSSA and Totally NSSA areas.


Solution
Topology:

1) Both Fortigates communicate each other in the subnet 192.0.2.0/30, this network belongs to Area 1.
2) Fortigate FGT1 is an ABR on Area 0 and Area 1, as well as an ASBR redistributing the route 192.0.2.12/30. FGT2 is a router in Area 1.
3) Network 192.0.2.4/30 belongs to Area 1.
4) Network 192.0.2.8/30 belongs to Area 0.


 
CASE1: Area 1 as Stub.
 
FGT1:
#FGT1 # show router ospf
config router ospf
    set router-id 192.0.2.1
    config area
        edit 0.0.0.0
        next
        edit 0.0.0.1
            set type stub
        next
    end
    config ospf-interface
        edit "port3"
            set interface "port3"
            set network-type point-to-point
        next
    end
    config network
        edit 1
            set prefix 192.0.2.0 255.255.255.252
            set area 0.0.0.1
        next
        edit 2
            set prefix 192.0.2.8 255.255.255.252
        next
    end
    config redistribute "connected"
    end
    config redistribute "static"
        set status enable

    end
    config redistribute "rip"
    end
    config redistribute "bgp"
    end
    config redistribute "isis"
    end
end
Routes in FGT1:
#FGT1 # get router info routing-table static

Routing table for VRF=0
S       192.0.2.12/30 [10/0] is a summary, Null

Routes received from FGT2:
FGT1 # get router info routing-table ospf
Routing table for VRF=0
O       192.0.2.4/30 [110/101] via 192.0.2.2, port3, 00:03:34
FGT1 receives the connected route from FGT2 as an intra area route, since it’s an ABR in area 0 and area 1.

FGT2:
#FGT2 # show router ospf
config router ospf
    set router-id 192.0.2.2
    config area
        edit 0.0.0.1
            set type stub
        next
    end
    config ospf-interface
        edit "port1"
            set interface "port1"
            set network-type point-to-point
        next
    end
    config network
        edit 1
            set prefix 192.0.2.0 255.255.255.252
            set area 0.0.0.1
        next
        edit 2
            set prefix 192.0.2.4 255.255.255.252
            set area 0.0.0.1
        next
    end
    config redistribute "connected"
    end
    config redistribute "static"
    end
    config redistribute "rip"
    end
    config redistribute "bgp"
    end
    config redistribute "isis"
    end
end
Routes received from FGT1:
FGT2 # get router info routing-table ospf
O*IA    0.0.0.0/0 [110/11] via 192.0.2.1, port1, 00:00:51
O IA    192.0.2.8/30 [110/101] via 192.0.2.1, port1, 00:00:51
FGT1 receives a default route instead of receiving the prefix 192.0.2.12/30.
 
 
CASE2: Area 1 as a Totally Stubby area.

FGT1:
#FGT1 (root) # show router ospf
config router ospf
    set router-id 192.0.2.1
    config area
        edit 0.0.0.0
        next
        edit 0.0.0.1
            set stub-type no-summary
            set type stub

        next
    end
    config ospf-interface
        edit "port3"
            set interface "port3"
            set network-type point-to-point
        next
    end
    config network
        edit 1
            set prefix 192.0.2.0 255.255.255.252
            set area 0.0.0.1
        next
        edit 2
            set prefix 192.0.2.8 255.255.255.252
        next
    end
    config redistribute "connected"
    end
    config redistribute "static"
        set status enable
    end
    config redistribute "rip"
    end
    config redistribute "bgp"
    end
    config redistribute "isis"
    end
end
Note: The setting 'no-summary' will keep the Type 3 LSA (LSAs for inter-area routes) from being advertised to area 1.
 
No configuration changes are needed in FGT2.
 
Routes received from FGT2:
FGT1 # get router info routing-table ospf
Routing table for VRF=0
O       192.0.2.4/30 [110/101] via 192.0.2.2, port3, 00:03:14
Routes received from FGT1:
FGT2 # get router info routing-table ospf
O*IA    0.0.0.0/0 [110/11] via 192.0.2.1, port1, 00:04:22

CASE 3: Area 1 as a Not-so-stubby area (NSSA).
 

Topology:
 
 
FGT2 is now an ASBR and it’s advertising the prefix 192.0.2.16/30 while being a router from Area 1.

FGT1:
FGT1 # show router ospf
config router ospf
    set router-id 192.0.2.1
    config area
        edit 0.0.0.0
        next
        edit 0.0.0.1
            set type nssa
        next
    end
    config ospf-interface
        edit "port3"
            set interface "port3"
            set network-type point-to-point
        next
    end
    config network
        edit 1
            set prefix 192.0.2.0 255.255.255.252
            set area 0.0.0.1
        next
        edit 2
            set prefix 192.0.2.8 255.255.255.252
        next
    end
    config redistribute "connected"
    end
    config redistribute "static"
        set status enable
    end
    config redistribute "rip"
    end
    config redistribute "bgp"
    end
    config redistribute "isis"
    end
end
FGT2:
FGT2 # show router ospf
config router ospf
    set router-id 192.0.2.2
    config area
        edit 0.0.0.1
            set type nssa
        next
    end
    config ospf-interface
        edit "port1"
            set interface "port1"
            set network-type point-to-point
        next
    end
    config network
        edit 1
            set prefix 192.0.2.0 255.255.255.252
            set area 0.0.0.1
        next
        edit 2
            set prefix 192.0.2.4 255.255.255.252
            set area 0.0.0.1
        next
    end
    config redistribute "connected"
    end
    config redistribute "static"
        set status enable
    end
    config redistribute "rip"
    end
    config redistribute "bgp"
    end
    config redistribute "isis"
    end
end
FGT2 # get router info routing-table static
S       192.0.2.16/30 [10/0] is a summary, Null
Routes received from FGT2:
FGT1 # get router info routing-table ospf
Routing table for VRF=0
O       192.0.2.5/32 [110/101] via 192.0.2.2, port3, 00:05:04
O N2    192.0.2.16/30 [110/10] via 192.0.2.2, port3, 00:00:25

Route to 192.0.2.16/30 is flagged as an external NSSA route type 2.

FGT2:
FGT2 # get router info routing-table ospf
O IA    192.0.2.8/30 [110/101] via 192.0.2.1, port1, 00:07:49
O N2    192.0.2.12/30 [110/10] via 192.0.2.1, port1, 00:07:48

Case 4: Area 1 as a Totally NSSA.

FGT1:
#FGT1 # show router ospf
config router ospf
    set router-id 192.0.2.1
    config area
        edit 0.0.0.0
        next
        edit 0.0.0.1
            set stub-type no-summary
            set type nssa

        next
    end
    config ospf-interface
        edit "port3"
            set interface "port3"
            set network-type point-to-point
        next
    end
    config network
        edit 1
            set prefix 192.0.2.0 255.255.255.252
            set area 0.0.0.1
        next
        edit 2
            set prefix 192.0.2.8 255.255.255.252
        next
    end
    config redistribute "connected"
    end
    config redistribute "static"
        set status enable
    end
    config redistribute "rip"
    end
    config redistribute "bgp"
    end
    config redistribute "isis"
    end
end
Note: No configuration changes were done in FGT2 from case 3.
 
Routes learned from FGT2:
FGT1 # get router info routing-table ospf
Routing table for VRF=0
O       192.0.2.5/32 [110/101] via 192.0.2.2, port3, 00:02:54
O N2    192.0.2.16/30 [110/10] via 192.0.2.2, port3, 00:02:53

Routes learned from FGT1:
FGT2 # get router info routing-table ospf
O*IA    0.0.0.0/0 [110/11] via 192.0.2.1, port1, 00:03:55
O N2    192.0.2.12/30 [110/10] via 192.0.2.1, port1, 00:03:54
Note: Intra-area prefixes were replaced by a default route.

Contributors