Social Icons

Friday, August 9, 2013

CCNP ROUTE: 10.Choosing the best OSPF routes - Intra-Area (internal)

When a router analyzes the LSDB to calculate the best route to each subnet, it does the following:
Step 1. Finds all subnets inside the area, based on the stub interfaces listed in the Type 1 LSAs and based on any Type 2 network LSAs
Step 2. Runs SPF to find all possible paths through the area’s topology, from itself to each subnet
Step 3. Calculates the OSPF interface costs for all outgoing interfaces in each route, picking the lowest total cost route for each subnet as the best route.

The router does the simple math of adding the costs of the outgoing interfaces in each route.
If the metrics tie, with a default setting of maximum-paths 4, adds up to 4 routes to its routing table, because OSPF supports equal-cost load balancing.

Default maximum path setting:
R5#show ip protocols | s ospf
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 5.5.5.5
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
...

The cost from R5 to R3's Loopback13 is calculated adding the costs of the outgoing interfaces along the path to the destination network

On R5's outgoing interface to R1:
R5#show ip ospf interface serial 0/0
Serial0/0 is up, line protocol is up
  Internet Address 192.168.0.18/30, Area 0
  Process ID 1, Router ID 5.5.5.5, Network Type POINT_TO_POINT, Cost: 64

On R1's outgoing interface to R3:
R1#show ip ospf interface fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.0.1/29, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10

On R3's Loopback 13 interface:
R3#show ip ospf interface loopback 13
Loopback13 is up, line protocol is up
  Internet Address 192.168.13.13/24, Area 0
  Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1

So the total cost of R5's route to 192.168.13.13/24 should be 64+10+1=75:
R5#show ip route
...
     192.168.13.0/32 is subnetted, 1 subnets
O       192.168.13.13 [110/75] via 192.168.0.17, 00:04:52, Serial0/0

Adding a FastEthernet link (192.168.0.24/30) directly between R1 and R2 and including that link into OSPF will create a redundancy path.
Having equal cost paths (FastEthernet) to R2 and networks in area 1 and the default maximum path value of 4, R1 installs 2 routes in the routing table:

R1#show ip route
...
     192.168.168.0/30 is subnetted, 1 subnets
O IA    192.168.168.0 [110/20] via 192.168.0.26, 00:00:17, FastEthernet0/1
                      [110/20] via 192.168.0.2, 00:00:17, FastEthernet0/0
     192.168.169.0/32 is subnetted, 1 subnets
O IA    192.168.169.170 [110/21] via 192.168.0.26, 00:00:17, FastEthernet0/1
                        [110/21] via 192.168.0.2, 00:00:17, FastEthernet0/0

No comments:

Post a Comment