Wednesday, January 4, 2012

OSPF FILTERING USING STUB/TOTALLY STUB/NSSA/TOTALLY NSSA

OSPF filtering Overview
OSPF is a link-state routing protocol
   - To calculate identical SPT everyone must have the same input into SPF algorithm (Same  link state database)
   - implies that filtering cannot be configured with an area
So our options are inter-area filtering through
- stub type area
- LSA 3 filter

OSPF Stub AREAS
----------------
- stub area used to limit type of lsa allowed to enter an area they are not used to filter prefixes just types

All router in the area must agree on the stub flag. So all router must be configured to be stub. An adjacency will not form between a router configured for stub and one not configured.

The stub flag is contained in the options field of the hello message.


OSPF STUB AREA
--------------
- remove external routers (lsa 5)
- removes ASBR adverisements (LSA 4)
- ABR originates Inter-Area default routes (lsa type 3 default route)
- it will keep lsa 3 summary from abr
to configure under the router ospf process
area "area" stub

This is mainly used when there are single exit points ABR out of the area as there is only one exit point it is wasteful to burden the processor of the router in the area calculating best path for networks outside of the ospf domain as the only router out is the ABR. The ABR generates as default route.
Totally Stub Area
------------------
A totally stub area goes one step further removing the lsa type 3 summary
- removes External Routes (LSA5)
-remove ASBR advertisiements (LSA 4)
-removes inter-area (LSA3_
- ABR originates a Inter Area Default Route
to configure. We do below command on all routers bar ABR in the area
router ospf 1
area "area-id" stub
on the abr we do the command
area " area-id" stub no-summary
so this means the only routes on internal area routers will be the lsa 1 + 2 and 1 default lsa type 3 recieved from the abr

The issue we could run into if for example in stub or totally stub area if we wanteed to redistributes routes from different routing domain into the stub totally stub area
it would not be supported that is where nssa area come in
OSPF NSSA
----------
NSSA (Not so stubby Area)
  - allows nssa external generating (lsa type 7) similar to external type 5








  -Removes external router (LSA Type 5)
  -Removes ASBR advertisements (LSA 4)
Allows redistributing of external routes they come up in as type 7
All routers must agree on NSSA  it sets a n bit flag in the options field of the hello packets
- area "areaid" nssa

ABR does not auto generate a default route this is to allow flexibilty as you may wish to redistribute a default route from the other routing domain if that is the case if the abr generated a default route. It would be type 7 (redistributed default route from other routing domain vs type 3 (From abr) no matter the metric of the redistribute is it would not win as ospf selection it wall always select type 3 over type 7

We can configure the abr to generate
area "areaid" nssa default-information originate
The ABR of the nssa connecting to area 0 will convert type 7 to type 5 for area 0

OSPF NSTSSA (NOT SO TOTALLY STUBBY AREA)
-------------------------------------------------------------
-allows nssa external generation (lsa 7)
-removes external routes (lsa 5)
-removes asbr advertisement (lsa 4)
-removes inter-area routes (lsa 3)
-abr originates inter-area default route
-nssa enabled on all routers in the area
router ospf 1
area "areaid" nssa

on the abrs
area "area" nssa no-summary
as we are removing specfic lsa type 3 we will generate a lsa type 3 summary by the abr this implies we will not be able to redistriube a static route

if we have multiple abr we can influence the path selection by using the command
area 1 default-cost "cost"
this will modify the cost of the default route being generated
we could alternatively modify the bandwidth cost on the links to the abr


ABRS
-----
When we configure stub areas or nssa. The abr do not exactly have to agree on the Totally part of it. The flag is the stub flag or nssa flag. SO one abr could be totally stub and another abr in the same area could be just stub . We might do this for traffic enginerring that one is generating the specfic lsa type 3 and the other is generating a default route only in lsa type 3 so the first one would be preference and the other abr would be backup

What happen if a ABR is also an ASBR
--------------------------------------------
if you run into a case where an abr is also as ASBR
- redistributed routes on a nssa router are originated as LSA type 7 into the nssa
for the area 0 they are redistributed as type 5
You can suppress type 7 originatation into nssa if for some reason there is no reason for the nssa area to have the routes
area "area" nssa no-redistribution
- send type 5 to area 0 but not type 7 to nssa area

LAB
----

OK for the lab we configure the different stub area types and see the affect on the ospf database
Ok for the stub area the best will be area 2 with it one abr to leave the area which is sw3



SO we will look at the ospf routes + database on bb3

BB3 Config PRE-STUB
-----------------------

bb3#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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
Gateway of last resort is not set
     222.222.222.0/32 is subnetted, 1 subnets
O IA    222.222.222.222 [110/797] via 16.16.16.1, 00:00:52, Ethernet0
     16.0.0.0/24 is subnetted, 1 subnets
C       16.16.16.0 is directly connected, Ethernet0
     33.0.0.0/32 is subnetted, 1 subnets
O IA    33.33.33.33 [110/11] via 16.16.16.1, 00:00:52, Ethernet0
     3.0.0.0/32 is subnetted, 2 subnets
O IA    3.3.3.3 [110/13] via 16.16.16.1, 00:00:52, Ethernet0
C       3.33.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/795] via 16.16.16.1, 00:00:54, Ethernet0
     172.25.0.0/24 is subnetted, 1 subnets
O IA    172.25.13.0 [110/796] via 16.16.16.1, 00:00:54, Ethernet0
     22.0.0.0/32 is subnetted, 1 subnets
O E2    22.22.22.22 [110/20] via 16.16.16.1, 00:00:54, Ethernet0
     10.0.0.0/24 is subnetted, 4 subnets
O IA    10.10.10.0 [110/794] via 16.16.16.1, 00:00:54, Ethernet0
O IA    10.228.254.0 [110/795] via 16.16.16.1, 00:00:54, Ethernet0
O IA    10.229.254.0 [110/857] via 16.16.16.1, 00:00:54, Ethernet0
O IA    10.164.49.0 [110/805] via 16.16.16.1, 00:00:54, Ethernet0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.11.11.0 [110/793] via 16.16.16.1, 00:00:54, Ethernet0
     12.0.0.0/24 is subnetted, 1 subnets
O IA    12.12.12.0 [110/12] via 16.16.16.1, 00:00:54, Ethernet0
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/11] via 16.16.16.1, 00:00:19, Ethernet0
     44.0.0.0/32 is subnetted, 1 subnets
O IA    44.44.44.44 [110/794] via 16.16.16.1, 00:00:54, Ethernet0
     15.0.0.0/24 is subnetted, 1 subnets
O IA    15.15.15.0 [110/11] via 16.16.16.1, 00:00:54, Ethernet0
bb3#

bb3#sh ip ospf database
            OSPF Router with ID (3.33.3.3) (Process ID 1)
                Router Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum Link count
3.33.3.3        3.33.3.3        88          0x80000003 0x0039FA 2
33.33.33.33     33.33.33.33     89          0x80000002 0x009F1C 1
                Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
16.16.16.2      3.33.3.3        88          0x80000001 0x00CD61
                Summary Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         33.33.33.33     80          0x80000001 0x003B6E
4.4.4.4         33.33.33.33     80          0x80000001 0x00B4DF
10.10.10.0      33.33.33.33     80          0x80000001 0x00F98D
10.164.49.0     33.33.33.33     80          0x80000001 0x007A40
10.228.254.0    33.33.33.33     80          0x80000001 0x003B7B
10.229.254.0    33.33.33.33     80          0x80000001 0x009DD9
11.11.11.0      33.33.33.33     80          0x80000001 0x00CBB9
12.12.12.0      33.33.33.33     83          0x80000001 0x000A88
13.13.13.0      33.33.33.33     42          0x80000003 0x00D7B6
15.15.15.0      33.33.33.33     78          0x80000003 0x008FF8
33.33.33.33     33.33.33.33     83          0x80000001 0x00BD75
44.44.44.44     33.33.33.33     83          0x80000001 0x007381
172.25.13.0     33.33.33.33     83          0x80000001 0x00F5DA
222.222.222.222 33.33.33.33     83          0x80000001 0x0075B1
                Summary ASB Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
2.2.2.2         33.33.33.33     83          0x80000001 0x000398
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
22.22.22.22     2.2.2.2         1721        0x80000002 0x0073E9 0
bb3#

ok i will config stub area 2

on bb3
-------
bb3(config)#router ospf 1
bb3(config-router)#area 2 stub
bb3(config-router)#
on s3
------
switch3(config)#router ospf 1
switch3(config-router)#area 2 stub
switch3(config-router)#

on bb3
------
bb3#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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
Gateway of last resort is 16.16.16.1 to network 0.0.0.0
     222.222.222.0/32 is subnetted, 1 subnets
O IA    222.222.222.222 [110/797] via 16.16.16.1, 00:00:23, Ethernet0
     16.0.0.0/24 is subnetted, 1 subnets
C       16.16.16.0 is directly connected, Ethernet0
     33.0.0.0/32 is subnetted, 1 subnets
O IA    33.33.33.33 [110/11] via 16.16.16.1, 00:00:23, Ethernet0
     3.0.0.0/32 is subnetted, 2 subnets
O IA    3.3.3.3 [110/13] via 16.16.16.1, 00:00:23, Ethernet0
C       3.33.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/795] via 16.16.16.1, 00:00:24, Ethernet0
     172.25.0.0/24 is subnetted, 1 subnets
O IA    172.25.13.0 [110/796] via 16.16.16.1, 00:00:24, Ethernet0
     10.0.0.0/24 is subnetted, 4 subnets
O IA    10.10.10.0 [110/794] via 16.16.16.1, 00:00:26, Ethernet0
O IA    10.228.254.0 [110/795] via 16.16.16.1, 00:00:26, Ethernet0
O IA    10.229.254.0 [110/857] via 16.16.16.1, 00:00:26, Ethernet0
O IA    10.164.49.0 [110/805] via 16.16.16.1, 00:00:26, Ethernet0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.11.11.0 [110/793] via 16.16.16.1, 00:00:26, Ethernet0
     12.0.0.0/24 is subnetted, 1 subnets
O IA    12.12.12.0 [110/12] via 16.16.16.1, 00:00:26, Ethernet0
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/11] via 16.16.16.1, 00:00:26, Ethernet0
     44.0.0.0/32 is subnetted, 1 subnets
O IA    44.44.44.44 [110/794] via 16.16.16.1, 00:00:26, Ethernet0
     15.0.0.0/24 is subnetted, 1 subnets
O IA    15.15.15.0 [110/11] via 16.16.16.1, 00:00:26, Ethernet0
O*IA 0.0.0.0/0 [110/11] via 16.16.16.1, 00:00:26, Ethernet0
bb3#
if you notice our external route to 22.22.22.22 is gone and we now have a default route via sw3

bb3#sh ip ospf database
            OSPF Router with ID (3.33.3.3) (Process ID 1)
                Router Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum Link count
3.33.3.3        3.33.3.3        112         0x80000006 0x003BF8 2
33.33.33.33     33.33.33.33     132         0x80000004 0x00AF0D 1
                Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
16.16.16.1      33.33.33.33     133         0x80000001 0x00F5E1
                Summary Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         33.33.33.33     138         0x80000001 0x00CFE9
3.3.3.3         33.33.33.33     138         0x80000002 0x005753
4.4.4.4         33.33.33.33     138         0x80000002 0x00D0C4
10.10.10.0      33.33.33.33     138         0x80000002 0x001672
10.164.49.0     33.33.33.33     138         0x80000002 0x009625
10.228.254.0    33.33.33.33     138         0x80000002 0x005760
10.229.254.0    33.33.33.33     138         0x80000002 0x00B9BE
11.11.11.0      33.33.33.33     139         0x80000002 0x00E79E
12.12.12.0      33.33.33.33     140         0x80000002 0x00266D
13.13.13.0      33.33.33.33     135         0x80000005 0x00F19C
15.15.15.0      33.33.33.33     140         0x80000004 0x00ABDD
33.33.33.33     33.33.33.33     140         0x80000002 0x00D95A
44.44.44.44     33.33.33.33     140         0x80000002 0x008F66
172.25.13.0     33.33.33.33     140         0x80000002 0x0012BF
222.222.222.222 33.33.33.33     140         0x80000002 0x009196
bb3#

so we have type 1 type 2 and type 3 lsa but not type 4 or 5
we have new type 3 lsa
0.0.0.0         33.33.33.33     138         0x80000001 0x00CFE9
a default route via 33.33.33.33 which is s3 the abr for the area

Totally Stub
-------------
ok now to convert to totally stub we just need to make an edit on s3
s3
---
switch3(config)#router ospf 1
switch3(config-router)#area 2 stub no-summary
switch3(config-router)#

bb3 already has the area 2 stub command that is required the no-summary is only required on the abr

bb3#sh ip ro
00:51:08: %SYS-5-CONFIG_I: Configured from console by consoleute
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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
Gateway of last resort is 16.16.16.1 to network 0.0.0.0
     16.0.0.0/24 is subnetted, 1 subnets
C       16.16.16.0 is directly connected, Ethernet0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.33.3.3 is directly connected, Loopback0
O*IA 0.0.0.0/0 [110/11] via 16.16.16.1, 00:00:43, Ethernet0
bb3#
there is a drastic change in the routing table
bb3#sh ip ospf database
            OSPF Router with ID (3.33.3.3) (Process ID 1)
                Router Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum Link count
3.33.3.3        3.33.3.3        87          0x80000005 0x004F21 1
33.33.33.33     33.33.33.33     97          0x80000004 0x00AF0D 1
                Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
16.16.16.1      33.33.33.33     98          0x80000001 0x00F5E1
                Summary Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         33.33.33.33     108         0x80000001 0x00CFE9
also the ospf database
all we are seeing is the lsa type 1 and lsa type 2 and 1 lsa type 3 default route

bb3#ping 10.228.254.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.228.254.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 100/102/108 ms
bb3#

i can ping outside the area address fine using the default route and also external to ospf domain
bb3#ping 22.22.22.22
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 132/134/136 ms
bb3#

OK now we will take a look at nssa we will configure this in area 1 s4 and r4 are the abr to area 0 + s2 is the asbr which is redistributing eigrp routes recieved from bb2

NSSA LAB
=========

r2#sh ip route
Codes: 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
Gateway of last resort is not set
     222.222.222.0/32 is subnetted, 1 subnets
C       222.222.222.222 is directly connected, Loopback0
     16.0.0.0/24 is subnetted, 1 subnets
O IA    16.16.16.0 [110/139] via 10.229.254.2, 00:03:13, Serial0/0.1
     33.0.0.0/32 is subnetted, 1 subnets
O IA    33.33.33.33 [110/130] via 10.229.254.2, 00:09:32, Serial0/0.1
     3.0.0.0/32 is subnetted, 2 subnets
O IA    3.3.3.3 [110/129] via 10.229.254.2, 00:09:32, Serial0/0.1
O IA    3.33.3.3 [110/140] via 10.229.254.2, 00:03:18, Serial0/0.1
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/3] via 172.25.13.2, 00:09:37, FastEthernet0/0
     172.25.0.0/24 is subnetted, 1 subnets
C       172.25.13.0 is directly connected, FastEthernet0/0
     22.0.0.0/32 is subnetted, 1 subnets
O E2    22.22.22.22 [110/20] via 172.25.13.2, 00:03:10, FastEthernet0/0
     10.0.0.0/24 is subnetted, 3 subnets
O       10.228.254.0 [110/2] via 172.25.13.2, 00:09:38, FastEthernet0/0
C       10.229.254.0 is directly connected, Serial0/0.1
O       10.164.49.0 [110/11] via 172.25.13.2, 00:09:38, FastEthernet0/0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.11.11.0 [110/128] via 10.229.254.2, 00:09:38, Serial0/0.1
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/129] via 10.229.254.2, 00:09:34, Serial0/0.1
     44.0.0.0/32 is subnetted, 1 subnets
O IA    44.44.44.44 [110/65] via 10.229.254.2, 00:09:38, Serial0/0.1
     15.0.0.0/24 is subnetted, 1 subnets
O IA    15.15.15.0 [110/130] via 10.229.254.2, 00:09:34, Serial0/0.1
r2# sh ip ospf database
            OSPF Router with ID (222.222.222.222) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         1061        0x8000000A 0x00C433 4
4.4.4.4         4.4.4.4         1250        0x80000005 0x0066C7 1
44.44.44.44     44.44.44.44     589         0x8000000A 0x009746 2
222.222.222.222 222.222.222.222 593         0x8000000D 0x002F82 5
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
10.228.254.2    4.4.4.4         1250        0x80000003 0x00C956
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         44.44.44.44     580         0x80000001 0x005EE0
3.33.3.3        44.44.44.44     206         0x80000001 0x0063B2
4.4.4.4         4.4.4.4         1250        0x80000003 0x005EBB
11.11.11.0      44.44.44.44     600         0x80000001 0x0051D9
13.13.13.0      44.44.44.44     580         0x80000001 0x001311
15.15.15.0      44.44.44.44     582         0x80000001 0x00D448
16.16.16.0      44.44.44.44     203         0x80000003 0x000708
33.33.33.33     44.44.44.44     582         0x80000001 0x00FEC6
44.44.44.44     44.44.44.44     596         0x80000005 0x006E68
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
22.22.22.22     2.2.2.2         1324        0x80000003 0x0071EA 0
r2#

to configure on
r2
---

r2(config-router)#router ospf 1
r2(config-router)#area 1 nssa
r2(config-router)#

s2
--
switch2(config)#router ospf 1
switch2(config-router)#area 1 nssa
switch2(config-router)#
s4
---

switch4(config)#router ospf 1
switch4(config-router)#area 1 nssa
switch4(config-router)#

r4
--
r4(config)#router ospf 1
r4(config-router)#area 1 nssa
r4(config-router)#



After nssa configuration
--------------------

r2
--
r2#sh ip rout
*Mar  1 04:26:03.223: %SYS-5-CONFIG_I: Configured from console by consolee
Codes: 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
Gateway of last resort is not set
     222.222.222.0/32 is subnetted, 1 subnets
C       222.222.222.222 is directly connected, Loopback0
     16.0.0.0/24 is subnetted, 1 subnets
O IA    16.16.16.0 [110/139] via 10.229.254.2, 00:00:09, Serial0/0.1
     33.0.0.0/32 is subnetted, 1 subnets
O IA    33.33.33.33 [110/130] via 10.229.254.2, 00:00:09, Serial0/0.1
     3.0.0.0/32 is subnetted, 2 subnets
O IA    3.3.3.3 [110/129] via 10.229.254.2, 00:00:09, Serial0/0.1
O IA    3.33.3.3 [110/140] via 10.229.254.2, 00:00:09, Serial0/0.1
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/3] via 172.25.13.2, 00:00:10, FastEthernet0/0
     172.25.0.0/24 is subnetted, 1 subnets
C       172.25.13.0 is directly connected, FastEthernet0/0
     22.0.0.0/32 is subnetted, 1 subnets
O N2    22.22.22.22 [110/20] via 172.25.13.2, 00:00:10, FastEthernet0/0
     10.0.0.0/24 is subnetted, 3 subnets
O       10.228.254.0 [110/2] via 172.25.13.2, 00:00:10, FastEthernet0/0
C       10.229.254.0 is directly connected, Serial0/0.1
O       10.164.49.0 [110/11] via 172.25.13.2, 00:00:10, FastEthernet0/0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.11.11.0 [110/128] via 10.229.254.2, 00:00:10, Serial0/0.1
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/129] via 10.229.254.2, 00:00:10, Serial0/0.1
     44.0.0.0/32 is subnetted, 1 subnets
O IA    44.44.44.44 [110/65] via 10.229.254.2, 00:00:10, Serial0/0.1
     15.0.0.0/24 is subnetted, 1 subnets
O IA    15.15.15.0 [110/130] via 10.229.254.2, 00:00:10, Serial0/0.1
r2#
the only real noticeable difference is that we have n2 route for 22.22.22.22 route notice we are not recieving any default route as we have the interarea routes this does not cause any issue and it would allow us to redistriubte a default route on the asbr if we wanted so more flexible
r2#sh ip ospf database
            OSPF Router with ID (222.222.222.222) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         364         0x80000010 0x005E8D 4
4.4.4.4         4.4.4.4         365         0x80000008 0x000C17 1
44.44.44.44     44.44.44.44     132         0x8000000F 0x003997 2
222.222.222.222 222.222.222.222 132         0x80000013 0x00C8DC 5
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
10.228.254.2    4.4.4.4         361         0x80000005 0x006BAC
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         44.44.44.44     143         0x80000002 0x000236
3.33.3.3        44.44.44.44     143         0x80000002 0x000708
4.4.4.4         4.4.4.4         372         0x80000004 0x000211
11.11.11.0      44.44.44.44     143         0x80000002 0x00F42F
13.13.13.0      44.44.44.44     143         0x80000002 0x00B666
15.15.15.0      44.44.44.44     145         0x80000002 0x00789D
16.16.16.0      44.44.44.44     145         0x80000004 0x00AA5D
33.33.33.33     44.44.44.44     145         0x80000002 0x00A21C
44.44.44.44     44.44.44.44     145         0x80000006 0x0012BD
                Type-7 AS External Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Tag
22.22.22.22     2.2.2.2         417         0x80000001 0x00E073 0
r2#
we are missing type 4 and type 5 lsa we do have a new lsa type 7

2#sh ip ospf database nssa-external 22.22.22.22
            OSPF Router with ID (222.222.222.222) (Process ID 1)
                Type-7 AS External Link States (Area 1)
  Routing Bit Set on this LSA
  LS age: 492
  Options: (No TOS-capability, Type 7/5 translation, DC)
  LS Type: AS External Link
  Link State ID: 22.22.22.22 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0xE073
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 10.164.49.2
        External Route Tag: 0

it is very similar to external lsa with layout notice the forward address this is the  bb2 interface connecting to s2
as it is redisitributed into ospf all the areas are aware of this address
I will know change it to a
not so totally stubby nssa
----------------------------
so as all the routers in area 2 have area 1 nssa command all that needs to be changed is the no-summary needs to be added to the abrs

s4
---

switch4(config)#router ospf 1
switch4(config-router)#area 1 nssa no-summary
switch4(config-router)#


I look at the affect on the routing table on r2

r2#sh ip route
Codes: 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
Gateway of last resort is 172.25.13.2 to network 0.0.0.0
     222.222.222.0/32 is subnetted, 1 subnets
C       222.222.222.222 is directly connected, Loopback0
     172.25.0.0/24 is subnetted, 1 subnets
C       172.25.13.0 is directly connected, FastEthernet0/0
     22.0.0.0/32 is subnetted, 1 subnets
O N2    22.22.22.22 [110/20] via 172.25.13.2, 00:01:21, FastEthernet0/0
     10.0.0.0/24 is subnetted, 3 subnets
O       10.228.254.0 [110/2] via 172.25.13.2, 00:10:15, FastEthernet0/0
C       10.229.254.0 is directly connected, Serial0/0.1
O       10.164.49.0 [110/11] via 172.25.13.2, 00:10:16, FastEthernet0/0
O*IA 0.0.0.0/0 [110/3] via 172.25.13.2, 00:00:20, FastEthernet0/0
r2#
notice all inter area (ia) are gone and our e2 route is replaced by n2 route and we
now have ia default route

r2#sh ip ospf database
            OSPF Router with ID (222.222.222.222) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         936         0x80000010 0x005E8D 4
4.4.4.4         4.4.4.4         936         0x80000008 0x000C17 1
44.44.44.44     44.44.44.44     703         0x8000000F 0x003997 2
222.222.222.222 222.222.222.222 703         0x80000013 0x00C8DC 5
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
10.228.254.2    4.4.4.4         932         0x80000005 0x006BAC
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         4.4.4.4         162         0x80000001 0x00C065
0.0.0.0         44.44.44.44     94          0x80000001 0x000C79
                Type-7 AS External Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Tag
22.22.22.22     2.2.2.2         986         0x80000001 0x00E073 0
r2#

ok so the lsa type 5 are gone lsa type 4 are gone and now the lsa type 3 are gone aswell we are recieving 2 default routes one from s4 and one from r4
r2#sh ip ospf database summary 0.0.0.0
            OSPF Router with ID (222.222.222.222) (Process ID 1)
                Summary Net Link States (Area 1)
  Routing Bit Set on this LSA
  LS age: 204
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 0.0.0.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xC065
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 1
  LS age: 136
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 0.0.0.0 (summary Network Number)
  Advertising Router: 44.44.44.44
  LS Seq Number: 80000001
  Checksum: 0xC79
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 1
r2#
the metric they are advertised with are the same
so we must have shorter metric to sw4 over r4 as the route via sw4 has been installed in the routing table
r2#traceroute 3.33.3.3 ttl 0 5
Type escape sequence to abort.
Tracing the route to 3.33.3.3
  0 172.25.13.2 4 msec 0 msec 0 msec
  1 172.25.13.2 4 msec 4 msec 0 msec
  2 10.228.254.2 4 msec 0 msec 4 msec
  3  *
    10.10.10.2 20 msec 20 msec
  4 11.11.11.3 56 msec 52 msec 52 msec
  5 13.13.13.7 56 msec 52 msec 52 msec
r2#

we are using sw4 to leave the area

lets pretend we would prefer if r4 was used to leave the area for internal ospf routes we could on r4 take off the no summary so r4 would advertise ia longer match routes while s4 would continue to just advertise the default route making r4 more preferable for inter area routes
so on r4
---------

r4(config)#router ospf 1
r4(config-router)#no area 1 nssa no-summary
r4(config-router)#area 1 nssa

on r2
-----

r2#sh ip route
Codes: 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
Gateway of last resort is 172.25.13.2 to network 0.0.0.0
     222.222.222.0/32 is subnetted, 1 subnets
C       222.222.222.222 is directly connected, Loopback0
     16.0.0.0/24 is subnetted, 1 subnets
O IA    16.16.16.0 [110/139] via 10.229.254.2, 00:01:37, Serial0/0.1
     33.0.0.0/32 is subnetted, 1 subnets
O IA    33.33.33.33 [110/130] via 10.229.254.2, 00:01:37, Serial0/0.1
     3.0.0.0/32 is subnetted, 2 subnets
O IA    3.3.3.3 [110/129] via 10.229.254.2, 00:01:37, Serial0/0.1
O IA    3.33.3.3 [110/140] via 10.229.254.2, 00:01:37, Serial0/0.1
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/3] via 172.25.13.2, 00:01:39, FastEthernet0/0
     172.25.0.0/24 is subnetted, 1 subnets
C       172.25.13.0 is directly connected, FastEthernet0/0
     22.0.0.0/32 is subnetted, 1 subnets
O N2    22.22.22.22 [110/20] via 172.25.13.2, 00:01:39, FastEthernet0/0
     10.0.0.0/24 is subnetted, 4 subnets
O IA    10.10.10.0 [110/65] via 10.229.254.2, 00:01:39, Serial0/0.1
O       10.228.254.0 [110/2] via 172.25.13.2, 00:01:39, FastEthernet0/0
C       10.229.254.0 is directly connected, Serial0/0.1
O       10.164.49.0 [110/11] via 172.25.13.2, 00:01:39, FastEthernet0/0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.11.11.0 [110/128] via 10.229.254.2, 00:01:39, Serial0/0.1
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/129] via 10.229.254.2, 00:01:39, Serial0/0.1
     44.0.0.0/32 is subnetted, 1 subnets
O       44.44.44.44 [110/65] via 10.229.254.2, 00:01:39, Serial0/0.1
     15.0.0.0/24 is subnetted, 1 subnets
O IA    15.15.15.0 [110/130] via 10.229.254.2, 00:01:39, Serial0/0.1
O*IA 0.0.0.0/0 [110/3] via 172.25.13.2, 00:01:39, FastEthernet0/0
r2#traceroute 3.33.3.3 ttl 0 5
Type escape sequence to abort.
Tracing the route to 3.33.3.3
  0 10.229.254.2 32 msec 32 msec 32 msec
  1 10.229.254.2 36 msec 32 msec 32 msec
  2 11.11.11.3 68 msec 64 msec 64 msec
  3 13.13.13.7 72 msec 68 msec 64 msec
  4 16.16.16.2 64 msec *  64 msec
r2#

we are recieving the ia routes from r4 and the default route from s2 we prefer the route via r4 even though it has a lower metric it is longer match route so it will take this.

i will do that s4 is also an ASBR it is redistributing static routes lets see the
effect it has on r2 in the nssa and r3 in area 0

so on s4
---------
switch4(config)#ip route 100.100.100.100 255.255.255.255 null 0
switch4(config)#router ospf 1
switch4(config-router)#redistribute static subnet
switch4(config-router)#

on r2 in the nssa
------------------
r2#sh ip route
Codes: 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
Gateway of last resort is 172.25.13.2 to network 0.0.0.0
     222.222.222.0/32 is subnetted, 1 subnets
C       222.222.222.222 is directly connected, Loopback0
     16.0.0.0/24 is subnetted, 1 subnets
O IA    16.16.16.0 [110/139] via 10.229.254.2, 00:10:00, Serial0/0.1
     100.0.0.0/32 is subnetted, 1 subnets
O N2    100.100.100.100 [110/20] via 172.25.13.2, 00:00:36, FastEthernet0/0

we recieve a n2 route for 100.100.100.100

lets check r3 in area 0
------------------------
r3#sh ip route
Codes: 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
Gateway of last resort is not set
     222.222.222.0/32 is subnetted, 1 subnets
O IA    222.222.222.222 [110/785] via 11.11.11.1, 00:11:14, Serial1/0.1
     16.0.0.0/24 is subnetted, 1 subnets
O IA    16.16.16.0 [110/11] via 13.13.13.7, 00:11:18, FastEthernet0/1
     100.0.0.0/32 is subnetted, 1 subnets
O E2    100.100.100.100 [110/20] via 11.11.11.1, 00:01:48, Serial1/0.1

we are recieving a e2 route
say for some reason we did not need the route in nssa area the default route would
suffic we could suppress the update by using the command on s4

switch4(config)#router ospf 1
switch4(config-router)#area 1 nssa no-redi
switch4(config-router)#
now r2
------

r2#sh ip route 100.100.100.100
% Network not in table
r2#

where on r3 it is still there
-------------
r3#sh ip route 100.100.100.100
Routing entry for 100.100.100.100/32
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 782
  Last update from 11.11.11.1 on Serial1/0.1, 00:05:22 ago
  Routing Descriptor Blocks:
  * 11.11.11.1, from 4.4.4.4, 00:05:22 ago, via Serial1/0.1
      Route metric is 20, traffic share count is 1
r3#

No comments:

Post a Comment