RIP, EIGRP, OSPF, IS-IS, BGP, MPLS, VTP, STP.
User avatar
dlots
Post Whore
Posts:
3540
Joined:
Mon Jun 15, 2009 9:48 am
Certs:
CC\NP\DP\IP\NP-Security\NA-Voice

Re: OSPF Quiz

Mon Oct 24, 2011 11:56 am

hmm nifty
I labbed it up and sure enough it doesn't load balance, however the cost remains the same on R4 if you take down the link on R1 to those networks... very nifty... gonna have to try and figure out how this works at some point
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com

User avatar
DanC
Ultimate Member
Posts:
852
Joined:
Mon Oct 06, 2008 8:01 am
Certs:
CCNA, CCNA-W, CCNP

Re: OSPF Quiz

Mon Oct 24, 2011 12:16 pm

dlots wrote:hmm nifty
I labbed it up and sure enough it doesn't load balance, however the cost remains the same on R4 if you take down the link on R1 to those networks... very nifty... gonna have to try and figure out how this works at some point


If I'm not mistaken it's to do with the SPF calculating the shortest path to each of the ASBR's, then selecting the lowest cost path because the route metric advertised by both is equal.

i.e. cost from R4 to R1 = 1
cost from R4 to R3 to R2 = 2

Look at the forward metrics on the route :)

User avatar
mellowd
CCIE #38070
Posts:
13814
Joined:
Wed Jun 18, 2008 7:49 am
Certs:
CCIE (RS,SP), JNCIE-SP, BC-/SPNE/NP

Re: OSPF Quiz

Mon Oct 24, 2011 12:19 pm

Indeed. Check the OSPF database and check the forward address and cost and so on

User avatar
jdsilva
Post Whore
Posts:
5347
Joined:
Mon Jan 17, 2005 11:01 pm
Certs:
CCNP

Re: OSPF Quiz

Mon Oct 24, 2011 12:32 pm

dlots wrote:hmm nifty
I labbed it up and sure enough it doesn't load balance, however the cost remains the same on R4 if you take down the link on R1 to those networks... very nifty... gonna have to try and figure out how this works at some point

Look at "show ip route x.x.x.x". There's a second metric in there...

User avatar
Dan-
Senior Member
Posts:
401
Joined:
Mon Feb 14, 2011 10:28 pm
Certs:
CCNA

Re: OSPF Quiz

Mon Oct 24, 2011 3:50 pm

Labbed this up..

Redistribute E2 on both:
R4>R1
Image
Code: Select all
R4#show ip route
     1.0.0.0/30 is subnetted, 3 subnets
O       1.1.1.0 [110/2] via 1.1.1.9, 00:03:18, FastEthernet0/0
C       1.1.1.4 is directly connected, FastEthernet0/1
C       1.1.1.8 is directly connected, FastEthernet0/0
O E2 192.168.1.0/24 [110/20] via 1.1.1.5, 00:03:18, FastEthernet0/1


Redistribute E1 on R2:
R4>R3>R2
Image
Code: Select all
R4#show ip route
     1.0.0.0/30 is subnetted, 3 subnets
O       1.1.1.0 [110/2] via 1.1.1.9, 00:10:39, FastEthernet0/0
C       1.1.1.4 is directly connected, FastEthernet0/1
C       1.1.1.8 is directly connected, FastEthernet0/0
O E1 192.168.1.0/24 [110/22] via 1.1.1.9, 00:00:08, FastEthernet0/0


If both R1 and R2 are Redistributing E1:
R4>R1
Image
Code: Select all
R4#show ip route
     1.0.0.0/30 is subnetted, 3 subnets
O       1.1.1.0 [110/2] via 1.1.1.9, 00:25:41, FastEthernet0/0
C       1.1.1.4 is directly connected, FastEthernet0/1
C       1.1.1.8 is directly connected, FastEthernet0/0
O E1 192.168.1.0/24 [110/21] via 1.1.1.5, 00:00:06, FastEthernet0/1


My reasoning: (please correct me if I am wrong)
E2 = Cost of only the external paths
E1 = Calculated by the cost of the external + internal paths.

Order of prioritized paths:
1. Intra-area paths
2. Inter-area paths
3. E1 external paths
4. E2 external paths

E1 is a higher priority, so it will override any E2.
If both are E2, wouldn't the external costs be 0 (for directly connected subnets) and *should* be load balancing? Or does it also take into consideration the number of hops/metrics and go R4>R1 because of a lower number of hops?

chrismarget
Senior Member
Posts:
387
Joined:
Wed Jan 26, 2011 3:38 pm

Re: OSPF Quiz

Mon Oct 24, 2011 3:58 pm

Dan- wrote:If both are E2, wouldn't the external costs be 0 (for directly connected subnets) and *should* be load balancing? Or does it also take into consideration the number of hops/metrics and go R4>R1 because of a lower number of hops?
The external costs won't be zero. They'll be whatever cost is used when redistributing. V_C told us to use 100, but the value doesn't matter. It only matters that the values are the same. Also, the "connectedness" of the routes on R1 and R2 isn't relevant to OSPF external metrics.

Here's why it doesn't load balance: Think about what would happen if R4 were load balancing in the first scenario (equivalent type 2 metrics). Some traffic would go straight to an ASBR (R1) and some traffic would go to R3.

What will R3 do? R3 would also have to load balance. Some traffic would go directly to an ASBR (R2), and some traffic would go to R4.

That's why it doesn't load balance. We created a routing loop. In that scenario, R4 is sending traffic to R3 and R3 is sending traffic to R4!

User avatar
Dan-
Senior Member
Posts:
401
Joined:
Mon Feb 14, 2011 10:28 pm
Certs:
CCNA

Re: OSPF Quiz

Mon Oct 24, 2011 4:15 pm

chrismarget wrote:
Dan- wrote:If both are E2, wouldn't the external costs be 0 (for directly connected subnets) and *should* be load balancing? Or does it also take into consideration the number of hops/metrics and go R4>R1 because of a lower number of hops?
The external costs won't be zero. They'll be whatever cost is used when redistributing. V_C told us to use 100, but the value doesn't matter. It only matters that the values are the same. Also, the "connectedness" of the routes on R1 and R2 isn't relevant to OSPF external metrics.

Here's why it doesn't load balance: Think about what would happen if R4 were load balancing in the first scenario (equivalent type 2 metrics). Some traffic would go straight to an ASBR (R1) and some traffic would go to R3.

What will R3 do? R3 would also have to load balance. Some traffic would go directly to an ASBR (R2), and some traffic would go to R4.

That's why it doesn't load balance. We created a routing loop. In that scenario, R4 is sending traffic to R3 and R3 is sending traffic to R4!


Aha! Yes, I see. It's starting to make sense now. R4 and R3 calculates the same E2 cost and causes the loop! And because of this routing loop, ospf will correct itself and the traffic will go through R1 instead.

I also misunderstood where the "cost" of the redistribution originates from. I thought it came from the external physical links (of the ABR's) as opposed to an arbitrary number encoded within the IOS. I tinkered around the ospf configuration and played around with the metric. Makes sense now.

Thank you

User avatar
DanC
Ultimate Member
Posts:
852
Joined:
Mon Oct 06, 2008 8:01 am
Certs:
CCNA, CCNA-W, CCNP

OSPF Quiz

Mon Oct 24, 2011 4:31 pm

Dan- wrote:
chrismarget wrote:
Dan- wrote:If both are E2, wouldn't the external costs be 0 (for directly connected subnets) and *should* be load balancing? Or does it also take into consideration the number of hops/metrics and go R4>R1 because of a lower number of hops?
The external costs won't be zero. They'll be whatever cost is used when redistributing. V_C told us to use 100, but the value doesn't matter. It only matters that the values are the same. Also, the "connectedness" of the routes on R1 and R2 isn't relevant to OSPF external metrics.

Here's why it doesn't load balance: Think about what would happen if R4 were load balancing in the first scenario (equivalent type 2 metrics). Some traffic would go straight to an ASBR (R1) and some traffic would go to R3.

What will R3 do? R3 would also have to load balance. Some traffic would go directly to an ASBR (R2), and some traffic would go to R4.

That's why it doesn't load balance. We created a routing loop. In that scenario, R4 is sending traffic to R3 and R3 is sending traffic to R4!


Aha! Yes, I see. It's starting to make sense now. R4 and R3 calculates the same E2 cost and causes the loop! And because of this routing loop, ospf will correct itself and the traffic will go through R1 instead.

I also misunderstood where the "cost" of the redistribution originates from. I thought it came from the external physical links (of the ABR's) as opposed to an arbitrary number encoded within the IOS. I tinkered around the ospf configuration and played around with the metric. Makes sense now.

Thank you


Examine the ospf database for the e2 link state, you'll notice that that the route is being advertised from both asbr's and the metric is identical (100). Because of this R4 then has to work out which is the shortest path i.e the lowest metric to each of the asbr's...


---
- Sent from my iPhone using Tapatalk

User avatar
Dan-
Senior Member
Posts:
401
Joined:
Mon Feb 14, 2011 10:28 pm
Certs:
CCNA

Re: OSPF Quiz

Mon Oct 24, 2011 4:43 pm

Examine the ospf database for the e2 link state, you'll notice that that the route is being advertised from both asbr's and the metric is identical (100). Because of this R4 then has to work out which is the shortest path i.e the lowest metric to each of the asbr's...


---
- Sent from my iPhone using Tapatalk

Cool, yeah I see it.
So, (from an image perspective) this is what is happening when the metrics and the E2 redistribution is equal:
Image
because if the metrics are the same, then ospf will then use shortest path to calculate the preferred route.

Fred
Post Whore
Posts:
2617
Joined:
Sat Jun 07, 2008 11:06 am
Certs:
CCNP, CCDP

Re: OSPF Quiz

Mon Oct 24, 2011 8:38 pm

Dan- wrote:Aha! Yes, I see. It's starting to make sense now. R4 and R3 calculates the same E2 cost and causes the loop! And because of this routing loop, ospf will correct itself and the traffic will go through R1 instead.

It's not correcting because of the loop. In fact, it's designed different so as to avoid the loop.

With all the editing and guessing, it's difficult to ascertain the correct answer, so maybe I'm wrong here (and I'll admit OSPF is my second weakest protocol, next to IS-IS). If I am incorrect, somebody please correct me with some authority.

The shortest path calculation is only performed within an area. When calculating paths to routes outside the AS, the router calculates the shortest path to the ASBR. Only when metrics are tied will it compare the costs. So question 1, it takes the R4->R1 path. Notably, this would be the same behavior if there was no redistribution and "EIGRP 10" circle was just a different OSPF area. (But possible Q3, if that were the case, but R1's connection to 192.168.1.0/24 was only 10Mbps, which path would R4 take and why?)

For question 2, like the others, I believe the E1/E2 comparison takes place before the SPF calculation to the ASBR, though I'm not 100% on this. This thread might be long enough for some actual confirmation. Vito?

User avatar
Vito_Corleone
Moderator
Posts:
9850
Joined:
Mon Apr 07, 2008 10:38 am
Certs:
CCNP RS, CCNP DC, CCDP, CCIP

Re: OSPF Quiz

Mon Oct 24, 2011 9:14 pm

I thought the posts had already confirmed the answers.

Question 1, R4 goes through R1 as it is the closest ABR.

Question 2, R4 goes through R3 as E1 is preferred over E2 regardless of cost.
http://blog.alwaysthenetwork.com

User avatar
mellowd
CCIE #38070
Posts:
13814
Joined:
Wed Jun 18, 2008 7:49 am
Certs:
CCIE (RS,SP), JNCIE-SP, BC-/SPNE/NP

Re: OSPF Quiz

Tue Oct 25, 2011 1:52 am

Fred wrote:For question 2, like the others, I believe the E1/E2 comparison takes place before the SPF calculation to the ASBR, though I'm not 100% on this.



This is correct

User avatar
dlots
Post Whore
Posts:
3540
Joined:
Mon Jun 15, 2009 9:48 am
Certs:
CC\NP\DP\IP\NP-Security\NA-Voice

Re: OSPF Quiz

Tue Oct 25, 2011 8:03 am

Figured I would throw this in for folk who don't want to lab it

R8(config-if)#do sh ip route 192.168.1.0
Routing entry for 192.168.1.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 10
Last update from 58.58.58.5 on FastEthernet0/1, 00:00:27 ago
Routing Descriptor Blocks:
* 58.58.58.5, from 58.58.58.5, 00:00:27 ago, via FastEthernet0/1
Route metric is 20, traffic share count is 1

***here I shut down the link from EIGRP route to R1 and the forward metric changes***

R8(config-if)#do sh ip route 192.168.1.0
Routing entry for 192.168.1.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 20
Last update from 78.78.78.7 on FastEthernet0/0, 00:00:06 ago
Routing Descriptor Blocks:
* 78.78.78.7, from 45.45.45.6, 00:00:06 ago, via FastEthernet0/0
Route metric is 20, traffic share count is 1
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com

'
Previous

Return to Cisco Routing and Switching

Who is online

Users browsing this forum: No registered users and 113 guests