Saturday, February 23, 2008

OSPF

The Open Shortest Path First (OSPF) protocol is a hierarchical interior gateway protocol (IGP) for routing in Internet Protocol, using a link-state in the individual areas that make up the hierarchy. A computation based on Dijkstra's algorithm is used to calculate the shortest path tree inside each area. The current version, Version 3, defined in RFC 2740 (OSPFv3 1999)[1], supports IPv6 only, while OSPF version 2 supports IPv4. (OSPFv2 1998)[2].
A link state database (LSDB) is constructed as a tree-image of the network topology, and identical copies of the LSDB are periodically updated on all routers in each OSPF-aware area (region of the network included in an OSPF area type - see "Area types" below). By convention, area 0 represents the core or "backbone" region of an OSPF-enabled network, and other OSPF area numbers may be designated to serve other regions of an enterprise (large, business) network - however every additional OSPF area must have a direct or virtual connection to the backbone OSPF area. The backbone area has the identifier 0.0.0.0. Inter-area routing goes via the backbone.
OSPF is perhaps the most widely-used IGP in large enterprise networks; IS-IS is more common in large service provider networks. The most widely-used exterior gateway protocol (EGP) is BGP. The OSPF Protocol can operate (communicate with other routers about "best-path" routes to save in their LSDBs) securely, optionally using a cleartext password or using MD5 to authenticate peers before forming adjacencies, and before accepting link-state advertisements (LSA).

Routers in the same broadcast domain or at each end of a point-to-point telecommunications link form adjacencies when they have detected each other. This detection occurs when a router "sees" itself in a hello packet. This is called a two way state and is the most basic relationship. The routers elect a designated router (DR) and a backup designated router (BDR) which act as a hub to reduce traffic between routers. OSPF uses both unicast and multicast to send "hello packets" and link state updates. Multicast addresses 224.0.0.5 (all SPF/link state routers) and 224.0.0.6 (all Designated Routers) are reserved for OSPF. In contrast to the Routing Information Protocol (RIP) or the Border Gateway Protocol (BGP), OSPF does not use TCP or UDP but uses IP directly, via IP protocol 89. OSPF handles its own error detection and correction, therefore negating the need for TCP or UDP functions.

Area types

An OSPF network is divided into areas, which have 32-bit area identifiers commonly, but not always, written in the dotted decimal format of an IP address. Area identifiers are not IP addresses and may duplicate, without conflict, any IP address. While most OSPF implementations will right-justify an area number written in other than dotted decimal format (e.g., area 1), it is wise always to use dotted decimal formats. Most implementations would expand area 1 to the area identifier 0.0.0.1, but some have been known to expand it as 1.0.0.0.
These are logical groupings of routers whose information may be summarized towards the rest of the network. Several "special" area types are defined:

Backbone area

The backbone area (also known as area zero or area 0.0.0.0) forms the core of an OSPF network. All other areas are connected to it, and inter-area routing happens via routers connected to the backbone area and to their own non-backbone areas. It is the logical and physical structure for the 'OSPF domain' and is attached to all nonzero areas in the OSPF domain.

The backbone area is responsible for distributing routing information between nonbackbone areas. The backbone must be contiguous, but it does not need to be physically contiguous; backbone connectivity can be established and maintained through the configuration of virtual links.
All OSPF areas must connect to the backbone area. This connection, however, can be through a virtual link. For example, assume area 0.0.0.1 has a physical connection to area 0.0.0.0. Further assume that area 0.0.0.2 has no direct connection to the backbone, but this area does have a connection to area 0.0.0.1. Area 0.0.0.2 can use a virtual link through the transit area 0.0.0.1 to reach the backbone. To be a transit area, an area has to have the transit attribute, so it cannot be stubby in any way.

[edit] Stub area
A stub area is an area which does not receive external routes except the default route, but does receive inter-area routes. This kind of area is useful when, for example, all Internet access goes through autonomous system border routers (ASBRs) in Area 0.0.0.0, but there are multiple paths to other nonzero areas in the OSPF domain.

All routers in the area need to agree they are stub, so that they do not generate types of LSA not appropriate to a stub area. The Type 5 LSA for the default route is the only external that should enter the area, and none of its routers may generate externals.
Stub areas do receive inter-area (IA) routes, advertised with Type 3 and Type 4 LSAs. If the stub area has more than one ABR, the information on other non-backbone areas allows the routers in the stub area to pick the best route to another area.
Stub areas do not have the transit attribute and thus cannot be traversed by a virtual link.
Stub areas receive default routes as type 3 network summary LSAs.

Totally stubby area

A totally stubby area (TSA), which is a nonstandard but useful extension by Cisco, is similar to a stub area, however this area does not allow summary routes in addition to the external routes, that is, inter-area (IA) routes are not summarized into totally stubby areas. The only way for traffic to get routed outside of the area is a default route which is the only Type-3 LSA advertised into the area. When there is only one route out of the area, fewer routing decisions have to be made by the route processor, which lowers system resource utilization.

Occasionally, it is said that a TSA can have only one ABR. This is not true. If there are multiple ABRs, as might be required for high availability, routers interior to the TSA will send non-intra-area traffic to the ABR with the lowest intra-area metric (the "closest" ABR).

my notes about ospf

No comments:

beach

beach
cottesloe beach restaurant

City of Perth

City of Perth
view from King's park

Houston TX

Houston TX

San antonio

San antonio
Powered By Blogger