...

Monday, April 5, 2010

CCNA 44

OSPF is the most popular routing protocol in the world. However, OSPF needs to deal with a lot of computations internally. To help make the routing more efficient, it is better to do route summarization. Routers with less routes are faster.
Suppose a router has 16 connected routes from 192.168.0.0/24 to 192.168.15.0/24. These subnets are only connected to that router and no where else. In a typical case, the router would advertise ALL the routes to neighbors. However, this is inefficient because the neighbor routers would not need to know if any route in the bunch went down because it would not exist anywhere else.

There are two ways to summarize this route. One way is to turn it into 192.168.0.0/16. This in essence the router telling the neighbors that it knows how to get to anything that starts with 192.168. However, this is inefficient because 192.168.16.0/24 may exist somewhere else.

A better way is to actually group all unchanging bits together. For example:
.0.0 would be  192.168.00000000.0
.5.0 would be  192.168.00000101.0
.10.0 would be 192.168.00001010.0
.15.0 would be 192.168.00001111.0
Notice that the first two and a half octets are unchanging. In this case, we can simply advertise a mask of 192.168.0.0/20 which would group everything from .0.0 to 0.15.0.

If the company somehow has growth and a 192.168.16.0 subnet is added, there are two things that can be done. First, the subnet mask can actually be shifted back so that we now advertise 192.168.0.0/19. However, this would encompass routes all the way to .31.255. A better way to do this in real life is to advertise two separate routes which are:
192.168.0.0/20
192.168.16.0/24

It is better to have two routes than have a single route that encompasses a lot of unnecessary routes which may look messy if the route appears somewhere else.

Areas are like maps. The entire topology is like a world map, and the topology in an area is like a city map. Only routers in the area know the full topology of the area. Routes from external areas are summarized. All areas must connect to area 0. The goal of areas is to localize updates within an area. Areas require a hierarchical design to be effective.

Any router that has interfaces in two or more areas are ABRs. ABR stands for Area Border Router. ABRs are the routers that perform summarization. A hierarchical design can be observed in the following example:

Suppose that Area 1 has routes from 192.168.0.0/24 to 192.168.31.0/24, and Area 2 has routes from 192.168.32.0/24 to 192.168.63.0/24. Area 3 has 172.16.0.0/24 to 172.16.15.0/24 and Area 4 has 172.16.16.0/24 to 172.16.31.0/24.

If routes aren't summarized properly, the routers in Area 0 would see the routes as:
Area 1
192.168.0.0/24
...
192.168.31.0/24
Area 2
192.168.32.0/24
...
192.168.63.0/24
Area 3
172.16.0.0/24
...
172.16.15.0/24
Area 4
172.16.16.0/24
...
172.16.31.0/24

That would be a LOT of routes. Therefore, we would need to summarize Area 1 and 2 into /27 masks and Area 3 and 4 into /28 masks. We would then have:
Area 1
192.168.0.0/27
Area 2
192.168.32.0/27
Area 3
172.16.0.0/28
Area 4
172.16.16.0/28

This effectively locks us into a hierarchical situation. Area 1 can be further subnetted, but we cannot bring any subnets in 192.168.0.0/27 out of area 1. This however, also becomes a convenience in that anything starting with 192.168.[0-15].0 can be sent to area 1.

Something to note in OSPF is that even though all routers have the same topology table, all routers will have different routing tables. All routers will calculate the best routes to everywhere using their location as the starting point. An area is used to localize topology updates, so anything that happens in area 0 stays in area 0. Other areas will just see the summary.

Another type of router role is an ASBR. ASBR stands for Autonomous System Boundary Router. The ASBR typically connects to the internet or another routing protocol. Like the ABR, the ASBR can also summarize.

OSPF neighbors send Hello messages on chosen interfaces. OSPF sends Hello every 10 seconds in Broadcast/P2P networks, and once every 30 seconds on NBMA networks (like Frame Relay).

The Hello messages contain information like:
-Router ID
-Hello and Dead timers*
-Network Mask*
-Area ID*
-Neighbors
-Router Priority
-DR/BDR IP address
-Authentication Password*

* indicates parameters that must match.

Administrators typically tune down the Hello intervals so downed neighbors are more quickly detected.

No comments :

Post a Comment

<