Following is the OSPF database I am going to use..
Finding the metric of an Intra Area Route
These routes are displayed in the routing table as O (Type 1 & 2). They are either generated by Router LSAs or the Network LSAs (by DRs of the segments if it is a multi access media). Anyhow they remain inside the area.
Note that the Network LSAs (Type 2) does not provide any information about the metrics, it only tells what are the attached routers in the segment and the mask.
So the Query process starts by looking at it's own adjacencies by examining it's own (self-originated) Router LSA (Type 1).
Here you can see the router we are talking about is connected to 2 networks.
1 of them are Stub Networks which means this is a link type that has no neighbors. This useful for representing a subnet, such as a loopback or user LAN.
1 is a Transit Network which means connection to a DR. Notice that the network mask information is not present here, and also that the addresses here are the interface addresses, not the RIDs.
These routes are displayed in the routing table as O (Type 1 & 2). They are either generated by Router LSAs or the Network LSAs (by DRs of the segments if it is a multi access media). Anyhow they remain inside the area.
Note that the Network LSAs (Type 2) does not provide any information about the metrics, it only tells what are the attached routers in the segment and the mask.
So the Query process starts by looking at it's own adjacencies by examining it's own (self-originated) Router LSA (Type 1).
Here you can see the router we are talking about is connected to 2 networks.
1 of them are Stub Networks which means this is a link type that has no neighbors. This useful for representing a subnet, such as a loopback or user LAN.
1 is a Transit Network which means connection to a DR. Notice that the network mask information is not present here, and also that the addresses here are the interface addresses, not the RIDs.
Now in order to find who is connected to that segment, the router should Query the Network LSA (Type 2) with the Link ID 155.1.58.5
Now according to the LSA, router with the ID 5.5.5.5 is connected to the subnet.
In order to find the networks which are connected to the 5.5.5.5 router, our router should perform another Router LSA (Type 1) lookup.
So now as you can see the 5.5.5.5 router is connected to 1 Stub Network and to a 1 Transit network which is same network our Querying router connected to.
So looks like the OSPF area is fully discovered by our router.
Now it can find the metrics to all the intra area routes.
Looks like the only route which goes to the routing table via OSPF process is 155.1.5.0/24 and it has the metric of 10+10 = 20 because from 5.5.5.5 router costs 10 + to the 5.5.5.5 router from our router costs 10. Others are directly connected subnets and will not go to the OSPF RIB.
Finding the metric of an Inter Area Route
These routes are displayed in the routing table as O IA (Type 3). They are the summarized routes from other areas and generated by ABRs.
Let's take 155.1.13.0 as an example.
Query the LSA Type 3 and find the advertising router
Now the recursion should start to find the metric to 5.5.5.5 router.
For that to begin, the router should start by looking at it's own adjacencies by examining it's own Router LSA (Type 1) and examine the Transit Networks by Network LSAs (Type 2) like it did to find the intra area routes and finally calculate the total metric to the destination by summing the cost to the destination from advertised router + the cost to the advertising router from itself.
In this case it's 1010 + 10 = 1020
Finding the metric of an External Route
These routes are displayed in the routing table as O E1 or O E2 (Type 5). If the area is an NSSA they will be displayed as O N1 or O N2 (Type 7). Anyhow they are redistributed routes.
Let's take 160.1.6.0 as the example.
Query the LSA Type 5 and find the Forward Address
If the Forward Address is non-zero, recurse to that address..
If the Forward Address is zero, recurse to the advertising router..
Because the Forwarding address is 150.1.6.6 the rescission should do to find that address.
In order to do so it should also go through the recursion process it went through for inter area routes.
It should look for the matching intra area or inter area route and find the advertising router and calculate the metrics like it did earlier.
The reason for this forward address not to be zero is that it is originated from an NSSA. Let's see what will be the recursion process if it was zero.
Now the lookup should be performed to find the metric to the advertising router 6.6.6.6
So now it is easy for this router in this example because another LSA can be used to find it. That is ASBR summary LSA (Type 4) which is originated by the ABR.
Because the External LSA tells that the metric type is 2, the total metric will be steady 20.
If the metric type was 1, it should be calculated like earlier, metric from the ASBR + metric to the ASBR.
Anyway as a conclusion it is always about finding the metric from the advertiser + the metric to the advertiser. and when it always narrows down to finding an intra area route.
Here is one of my old posts which shows how I manually drew an OSPF road map. click here
Now according to the LSA, router with the ID 5.5.5.5 is connected to the subnet.
In order to find the networks which are connected to the 5.5.5.5 router, our router should perform another Router LSA (Type 1) lookup.
So now as you can see the 5.5.5.5 router is connected to 1 Stub Network and to a 1 Transit network which is same network our Querying router connected to.
So looks like the OSPF area is fully discovered by our router.
Now it can find the metrics to all the intra area routes.
Looks like the only route which goes to the routing table via OSPF process is 155.1.5.0/24 and it has the metric of 10+10 = 20 because from 5.5.5.5 router costs 10 + to the 5.5.5.5 router from our router costs 10. Others are directly connected subnets and will not go to the OSPF RIB.
Finding the metric of an Inter Area Route
These routes are displayed in the routing table as O IA (Type 3). They are the summarized routes from other areas and generated by ABRs.
Let's take 155.1.13.0 as an example.
Query the LSA Type 3 and find the advertising router
Now the recursion should start to find the metric to 5.5.5.5 router.
For that to begin, the router should start by looking at it's own adjacencies by examining it's own Router LSA (Type 1) and examine the Transit Networks by Network LSAs (Type 2) like it did to find the intra area routes and finally calculate the total metric to the destination by summing the cost to the destination from advertised router + the cost to the advertising router from itself.
In this case it's 1010 + 10 = 1020
Finding the metric of an External Route
These routes are displayed in the routing table as O E1 or O E2 (Type 5). If the area is an NSSA they will be displayed as O N1 or O N2 (Type 7). Anyhow they are redistributed routes.
Let's take 160.1.6.0 as the example.
Query the LSA Type 5 and find the Forward Address
If the Forward Address is non-zero, recurse to that address..
If the Forward Address is zero, recurse to the advertising router..
Because the Forwarding address is 150.1.6.6 the rescission should do to find that address.
In order to do so it should also go through the recursion process it went through for inter area routes.
It should look for the matching intra area or inter area route and find the advertising router and calculate the metrics like it did earlier.
The reason for this forward address not to be zero is that it is originated from an NSSA. Let's see what will be the recursion process if it was zero.
Now the lookup should be performed to find the metric to the advertising router 6.6.6.6
So now it is easy for this router in this example because another LSA can be used to find it. That is ASBR summary LSA (Type 4) which is originated by the ABR.
Because the External LSA tells that the metric type is 2, the total metric will be steady 20.
If the metric type was 1, it should be calculated like earlier, metric from the ASBR + metric to the ASBR.
Anyway as a conclusion it is always about finding the metric from the advertiser + the metric to the advertiser. and when it always narrows down to finding an intra area route.
Here is one of my old posts which shows how I manually drew an OSPF road map. click here
No comments:
Post a Comment