Thursday

OSPF Stub area, totally stubby and NSSA

multiple-area OSPF on a router

 

this is standard ospf out put from sho ip osp neighbor and router and if you look at R2 they are no inter-area routes
Now we are Using  configure a OSPF are 23 as a STUB and do the show ip ospf on R2. As you see area 23 now is shows as stub area . Lets do a show ip route command on R3, you can see that R3 now has a default route pointing toward R2. A stub area does not receive any external routes. It receives a default route and OSPF inter-area routes.

The command to configure stubby area is as follow:
R2(config)# router ospf 1
R2(config-router)# area 23 stub
R3(config)# router ospf 1
R3(config-router)# area 23 stub


On R2 we are going to do show ip ospf database to examine the LSA's. As you see we have only 2 LAS's for each area.
In this next senario we configured OSPF as totally stubby area , look at the out put of sho ip ospf database and look at the LSA for area 23 . you see that the default route was injected and when you issue the command sho ip route you can only see the incoming route from ospf .

The command to configure totally stubby areais as follow:

Enter the stub no-summary command on R2 (the ABR) under the OSPF process. 
R2(config)# router ospf 1
R2(config-router)# area 23 stub no-summary


Now will discus NSSA. 

To generate an external route into the NSSA, use the redistribute connected subnets command on R3. This adds the previously unreachable loopback 20 into OSPF. Be sure to include the subnets keyword; otherwise, only classful networks are redistributed.

R2(config)# router ospf 1
R2(config-router)# no area 23 stub
R2(config-router)# area 23 nssa

R3(config)# router ospf 1
R3(config-router)# no area 23 stub
R3(config-router)# area 23 nssa
R3(config-router)# redistribute connected subnets

after the config on R2 and R3 as ASSA we come up w/ the following out out when sho ip osp command is typed on R2 (it will be the same on R3) :



Nlet look at routing table for each router and see what happen . lets type show ip route on R2. Notice that the external route comes in as type N2 from R3. This is because it is a special NSSA external route
Now lets do  show ip route output on R1. Notice that the route is now a regular E2 external route, because R2 has performed the type 7 to type 5 translation and R3 no longer has a default route in it, but inter-area routes are coming in.
Note: An NSSA does not have the default route injected by the ABR (R2) automatically. It is possible to make the ABR inject the default route into the NSSA using the area 23 nssa default-information-originate command on R2


Monday

Route Summarization Calculation Example

Networks to summarize :We are using /24

172.16.8.0
172.16.9.0
172.16.10.0
172.16.11.0
172.16.12.0
172.16.13.0
172.16.14.0
172.16.15.0
172.16.16.0
172.16.17.0
172.16.18.0
172.16.19.0

first we need addresses converted to binary format:
(in this example the changes occurs on the 3rd octet )

00001000 =8
00001001 =9
00001010 =10
00001011 =11
00001100 =12
00001101 =13
00001110 =14
00001111 =15
00010000 =16
00010000 =17
00010001 =18
00010011 =19

we need to locate the ON=1 bits at which the common pattern of digits ends
00001|000 =8
00001|001 =9
00001|010 =10
00001|011 =11
00001|100 =12
00001|101 =13
00001|110 =14
00001|111 =15
0001|0000 =16
0001|0000 =17
0001|0001 =18
0001|0011 =19

Now lets look for summary address(es) !!!

00001 = 8
0001 = 16

now let put this 2 numbers on the 3rd octet of the Ip
AHA !!! we have 2 summary addresses
172.16.8.0 and 172.16.16.0

Now we need to find out the subnet masks for this 2 Ip.
Locate the bit where the common pattern of digits ends for the 2 Ips.

00001|000 =8
00001|001 =9
00001|010 =10
00001|011 =11
00001|100 =12
00001|101 =13
00001|110 =14
00001|111 =15

000100|00 =16
000100|00 =17
000100|01 =18
000100|11 =19

The first 21 bits of the IP addresses from 172.16.8.0 through 172.16.15.0 Therefore /21
The first 22 bits of the IP addresses from 172.16.16.0 through 172.16.19.0 Therefore /22.

And we use this value as a 3rd octet in our net-mask

So :

172.16.8.0 255.255.248.0
172.16.16.0 255.255.252.0

Its our summarized routes / networks.