OSPF routing between areas

Unanswered Question
Sep 13th, 2007

Hi,

[IMG]http://i64.photobucket.com/albums/h189/rakem_2006/areas.jpg[/IMG]

Say i have an OSPF network configured similar to the image.

router 2 and 3 and connected two links but one is in area 10 and one is in area 0.

say the link between router 2 and 3 in area 0 failed. Would traffic be re-routed through the link in area 10?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.9 (9 ratings)
Loading.
paul.matthews Fri, 09/14/2007 - 01:37

Both routers are ABRs between 0 and 10. Depending upon the config of the routers there are a number of things that can happen. I will assume that area 10 is not any form of stub, so bothe routers will have the full LSA database for both areas.

Normally the traffic I would expect to be on the area zero link between the routers would be traffic within area zero - eg they both have a lan in area zero, and this link is the best route between them.

Should the link in area zero fail between these two routers, the area zero traffic will reroute within area zero, it will not reroute via area 10, even if that link is a 155M ATM and the A0 reroute is fifteen consecutive 56K links.

If the source is in A0 and target traffic was a LAN in A10, the traffic would have had two options options to get to the target network, hopping from A0 to A10 at either router. If the metric for a target at R2 is better via A0 it would go via the A0 link, if the metric is better via A10 it would transfer from A0 to A10 at R2 and use that link. Should the A0 R2-R3 link fail, A0 will recompute the SPF, including the IA links. At that point, one would expect that at R2 for A10 destinations would be straight into A10 (but that is not guarnateed!) in which case the traffic would re-route via the link between R2&R3 in area 10.

The metric may also not be that relevant. If OSPF has been designed and configured well, you may only be advertising a summary route for all A10, in which case R2 will have detailed routes for A10 that will win on the most specific rule, and all traffic into A10 that gets to R2 will go straight into A10.

Then we get onto the varieties of stub areas...

Complex this inter area routing lark isn't it!

Kevin Dorrell Fri, 09/14/2007 - 01:54

Paul,

I saw this question and I thought I would let someone else have a go at it for starters.

What I was not sure about was if the area 0 link between R2 and R3 goes down, then area 0 becomes discontiguous. So, routes on R1 will get injected into area 10 via R2, but will they then get re-injected into "the other area 0" on R3? That is, would a network on R1 area 0 have connectivity with a network on R4 area 0?

Whatever that answer to this question, something tells me to make a virtual link between R2 and R3, transiting area 10. What do you think?

Kevin Dorrell

Luxembourg

paul.matthews Fri, 09/14/2007 - 02:13

Chicken

As the digram stands it is a poorly designed backbone area, as you rightly say. Breaking any link in A0 results in a discontiguous backbone, and if the diagram is the complete story, Virtual links would be needed.

I was *assuming* that there would be other links within area zero, as going straight in the deep end with virtual links may be a bit much!

If this is the full picture, rather than virtual links I would suggest one of two options - either do it properly nd add resilient links within area zero, or forget the multiple areas as this is still a small network where there the admin overhead of multi areas outweights the benefits.

Interesting point about routes back to the "other area 0" Routes from A0 to A10 will be summaries rather than external routes, so will an ABR forward a summary that was sourced from area 0 into area 10 back to a0. I don't know definitively, but I suspect not, as that is asking for a loop!

Anyway, virtual links are for people that can't design networks

Kevin Dorrell Fri, 09/14/2007 - 03:32

True, but virtual links seem to be a favo[u]rite of the writers of CCIE practice labs, especially the ones that span A0 to A0 across a transit area to repair the backbone. (Virtual links, that is, not the writers or the practice labs!)

But the point about whether summaries passed from area 0 to an outlying area can then get re-injected to A0 in another ABR - that is a much more serious point which I should try and resolve. Normally it should not lead to loops, because OSPF will prefer O routes over IA routes.

I'll have a look in Doyle this evening.

Kevin Dorrell

Luxembourg

paul.matthews Fri, 09/14/2007 - 05:10

In the lab, I have four routers

R8 - 10.0.38.0 - R3 - 10.10.23.0 - R2 - 10.0.29.0 - R9

OSPF router ospf 10

net 10.0.0.0 0.0.255.255 a 0

net 10.10.0.0 0.0.255.255 a 10

so I have built with a discontiguous backbone, and no virtual link.

With the R2-R9 shutdown, an extract of R2s table is:

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 7 subnets

O IA 10.0.38.0/24 [110/128] via 10.10.23.2, 00:00:00, Serial4/0

so I have the summary LSA for the link in the backbone, and it has made it to the routing table:

Summary Net Link States (Area 10)

Link ID ADV Router Age Seq# Checksum

10.0.38.0 10.20.39.3 671 0x80000001 0x00C6BD

When I bring the "other backbone" up, 10.0.38.0 disappears from the routing table on R2.

The LSA is still in the database, but no longer makes it to the touting table.

R8 and R9 both have the route to 10.10.23.0.

Take down the R2-R9 link and the route returns.

Interesting! That is apparently some form of loop protection in OSPF, though without digging I don't know why.

When I repair the backbone using a VLink, both end routers get the route.

Back to the LSA. The entry is:

Summary Net Link States (Area 10)

LS age: 1589

Options: (No TOS-capability, DC, Upward)

LS Type: Summary Links(Network)

Link State ID: 10.0.38.0 (summary Network Number)

Advertising Router: 10.20.39.3

LS Seq Number: 80000001

Checksum: 0xC6BD

Length: 28

Network Mask: /24

TOS: 0 Metric: 64

Initially I thoight it may be the resence of a link on area 0, so I took OSPF off R9. R2 still had a link up in A0, but the route to 10.0.38.0/24 returned.

So with an active neighbour in area 0, the summary LSA does not make it to the routing table.

OSPF - basic rule - all areas shall connect to area0.

Therefore if I am an ABR, with an active neighbour in area 0, I should get routes directly from area 0?

Curious...

I wonder if we have lost the OP yet? If so please accept our apologies, as your question has sparked an interesting point that has caught our interest.

LucaSalvatore_2 Fri, 09/14/2007 - 06:53

hey thanks for the replies!

so lets say now that routers 2 and 3 had their own LANS coming from them which would also be in area 10. One LAN of each router,and both would be stub.

with this setup, and if all metrics are equal, then area 10 traffic would stay in are 10 and area 0 traffic would stay in area 0, i suppose.

but given a failure of either link between r2 and r3 the desired result would be for the network to remain active and traffic to be re-routed.

im going to try this in my lab tomorrow as well... well post results

paul.matthews Fri, 09/14/2007 - 06:59

I'm glad we haven't lost you!

If you are talking about the area being a stub, it can make a difference what type of stub. is it is totally stubby, all that will go in is a default route rather than any detail.

If there is no alternate link round the rest of area 0, then to get the traffic through area 10 you will need a virtual link.

Please don't forget to rate posts.

Kevin Dorrell Fri, 09/14/2007 - 07:12

Luca,

Please bear in mind that in OSPF, it is the whole area that is a stub, not individual networks. And if A10 is a stub, then it will not be allowed to be a transit for any virtual links.

Yes, you are right that normally area 0 traffic will stay in area 0, and area 10 traffic in area 10. That will be regardless of the metrics because an O route will always be preferred over an IA.

If the area 10 link is broken, then you have two area 10s. Surprisingly, that does not matter. It behaves like two seperate areas, say an area 10 and an area 11. That is regardless of whether area 10 was a stub.

If the backbone gets broken, that's more serious. R2 and R3 will still see each other, but R1 and R4 will not. Unless you repair it with a virtual link through A10, but to do that, A10 must NOT be a stub.

Let us know how you get on in the lab. I still have to think hard about Paul's last posting.

Kevin Dorrell

Luxembourg

LucaSalvatore_2 Fri, 09/14/2007 - 20:37

http://s64.photobucket.com/albums/h189/rakem_2006/?action=view&current=ospf.jpg

Ok so may lab is configured as shown in the image above, I have configured all this is a dynamips lab using a 7200 image.

Here are some outputs with everything working well:

R2#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

10.180.70.1 0 FULL/ - 00:00:32 10.180.70.1 Serial1/0

6.1.1.1 0 FULL/ - 00:00:32 10.147.0.2 Serial1/1

6.1.1.1 0 FULL/ - 00:00:32 172.16.1.2 Serial1/2

R2#

Notice how R2 has formed an adjacency with 6.1.1.1 over both the A0 and A7 link?. Not sure if this is expected behaviour or not. Same thing has happened with R3, shown below.

R3#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

10.224.200.1 0 FULL/ - 00:00:33 10.224.200.1 Serial1/3

5.1.1.1 0 FULL/ - 00:00:32 10.147.0.1 Serial1/1

5.1.1.1 0 FULL/ - 00:00:32 172.16.1.1 Serial1/2

R3#

R2#sh ip route

Gateway of last resort is not set

5.0.0.0/30 is subnetted, 1 subnets

C 5.1.1.0 is directly connected, Loopback0

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks

C 172.16.10.0/24 is directly connected, FastEthernet0/0

C 172.16.1.0/30 is directly connected, Serial1/2

O 172.16.121.0/24 [110/65] via 172.16.1.2, 00:04:13, Serial1/2

10.0.0.0/30 is subnetted, 3 subnets

O 10.224.200.0 [110/128] via 10.147.0.2, 00:04:13, Serial1/1

C 10.147.0.0 is directly connected, Serial1/1

C 10.180.70.0 is directly connected, Serial1/0

R2#

R3#sh ip route

6.0.0.0/30 is subnetted, 1 subnets

C 6.1.1.0 is directly connected, Loopback0

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks

O 172.16.10.0/24 [110/65] via 172.16.1.1, 00:05:23, Serial1/2

C 172.16.1.0/30 is directly connected, Serial1/2

C 172.16.121.0/24 is directly connected, FastEthernet0/0

10.0.0.0/30 is subnetted, 3 subnets

C 10.224.200.0 is directly connected, Serial1/3

C 10.147.0.0 is directly connected, Serial1/1

O 10.180.70.0 [110/128] via 10.147.0.1, 00:05:23, Serial1/1

R3#

Ok so now for some testing I shutdown interface 10.147.0.2 on R3

R2#sh ip route

5.0.0.0/30 is subnetted, 1 subnets

C 5.1.1.0 is directly connected, Loopback0

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks

C 172.16.10.0/24 is directly connected, FastEthernet0/0

C 172.16.1.0/30 is directly connected, Serial1/2

O 172.16.121.0/24 [110/65] via 172.16.1.2, 00:08:21, Serial1/2

10.0.0.0/30 is subnetted, 1 subnets

C 10.180.70.0 is directly connected, Serial1/0

R2#

So here the the routing table on R2 after I shutdown the interface on R3. As you can see it has dropped the 103.224.200.0 subnet so it has not re-routed it through the A7 interfaces.

R2#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

10.180.70.1 0 FULL/ - 00:00:32 10.180.70.1 Serial1/0

6.1.1.1 0 FULL/ - 00:00:31 172.16.1.2 Serial1/2

R2#

I brought the interface back up then decided to shutdown the 172.16.1.2 interface on R3

R2#sh ip route

5.0.0.0/30 is subnetted, 1 subnets

C 5.1.1.0 is directly connected, Loopback0

172.16.0.0/24 is subnetted, 2 subnets

C 172.16.10.0 is directly connected, FastEthernet0/0

O IA 172.16.121.0 [110/65] via 10.147.0.2, 00:00:03, Serial1/1

10.0.0.0/30 is subnetted, 3 subnets

O 10.224.200.0 [110/128] via 10.147.0.2, 00:00:32, Serial1/1

C 10.147.0.0 is directly connected, Serial1/1

C 10.180.70.0 is directly connected, Serial1/0

R2#

Interestingly with the 172.16.1.2 interface on R3 down notice how R2 has re-routed traffic through the A0 interface 10.147.0.2

continued below .....

LucaSalvatore_2 Fri, 09/14/2007 - 20:38

So it would seem that a network like this has been poorly designed. A more robust design would have been to put both the links between R2 and R3 in area 0 and possible put the 4 stub networks in other areas.

So from my testing it would seem that if the backbone link fails (in this case the A0 link 10.147.0.0/30 subnet between R2 and R3) that traffic will not be routed through a different area. But if an non backbone link fails i.e. A7 in this example, traffic will be happily routed through A0

Kevin Dorrell Sat, 09/15/2007 - 08:49

Great investigation Luca, and thanks for sharing the results with us. That is as we had expected then: that it is OK for an outlying area to become discontiguous, but not the backbone.

Now I am going to do some thinking to see if I can explain it in terms of the different LSA types. You are right that you would not normally design a network like this, but the lab experience is always helpful in understanding.

Kevin Dorrell

Luxembourg

Actions

This Discussion