OSPF Area 0 Area 1 and Area 2

Open Shortest Path First (OSPF) is a link-state routing protocol for Internet Protocol (IP) networks. It uses a link state routing algorithm and falls into the group of interior routing protocols, operating within a single autonomous system (AS). It is defined as OSPF Version 2 in RFC 2328 (1998) for IPv4. The updates for IPv6 are specified as OSPF Version 3 in RFC 5340 (2008).

OSPF is perhaps the most widely used interior gateway protocol (IGP) in large enterprise networks. IS-IS, another link-state dynamic routing protocol, is more common in large service provider networks. The most widely used exterior gateway protocol is the Border Gateway Protocol (BGP), the principal routing protocol between autonomous systems on the Internet.

Backbone area

The backbone area (also known as area 0 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 associated areas. It is the logical and physical structure for the ‘OSPF domain’ and is attached to all nonzero areas in the OSPF domain. Note that in OSPF the term Autonomous System Boundary Router (ASBR) is historic, in the sense that many OSPF domains can coexist in the same Internet-visible autonomous system, RFC1996 (ASGuidelines 1996,

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.

Image

ImageImageImageImageImageImage

Note: It should be configured Area 0 as first Router config ie We have to configured in R2 Area 0 as first because Area 0 is the backbone Area.

see the R2 Router Config in above notepad ……otherwise Routers may not be ping….

OSPF router types

OSPF defines the following router types:

  • Area border router (ABR)
  • Autonomous system boundary router (ASBR)
  • Internal router (IR)
  • Backbone router (BR)

The router type is an attribute of an OSPF process. A given physical router may have one or more OSPF processes. For example, a router that is connected to more than one area, and which receives routes from a BGP process connected to another AS, is both an area border router and an autonomous system boundary router.

Each router has an identifier, customarily written in the dotted decimal format (e.g., 1.2.3.4) of an IP address. This identifier must be established in every OSPF instance. If not explicitly configured, the highest logical IP address will be duplicated as the router identifier. However, since the router identifier is not an IP address, it does not have to be a part of any routable subnet in the network, and often isn’t to avoid confusion.

These router types should not be confused with the terms designated router (DR), or backup designated router (BDR), which are attributes of a router interface, not the router itself.

Area border router

An area border router (ABR) is a router that connects one or more areas to the main backbone network. It is considered a member of all areas it is connected to. An ABR keeps multiple copies of the link-state database in memory, one for each area to which that router is connected.

Autonomous system boundary router

An autonomous system boundary router (ASBR) is a router that is connected to more than one Routing protocol and that exchanges routing information with routers in other protocols. ASBRs typically also run an exterior routing protocol (e.g., BGP), or use static routes, or both. An ASBR is used to distribute routes received from other, external ASs throughout its own autonomous system. An ASBR creates External LSAs for external addresses and floods them to all areas via ABR. Routers in other areas use ABRs as next hops to access external addresses. Then ABRs forward packets to the ASBR that announces the external addresses.

Internal router

An internal router is a router that has OSPF neighbor relationships with interfaces in the same area. An internal router has all its interfaces in a single area.

Designated router

designated router (DR) is the router interface elected among all routers on a particular multiaccess network segment, generally assumed to be broadcast multiaccess. The basic neighbor discovery process (Hello), flooding (224.0.0.6), DR election (priority, RID). Special techniques, often vendor-dependent, may be needed to support the DR function on nonbroadcast multiaccess (NBMA) media. It is usually wise to configure the individual virtual circuits of a NBMA subnet as individual point-to-point lines; the techniques used are implementation-dependent.

Do not confuse the DR with an OSPF router type. A given physical router can have some interfaces that are designated (DR), others that are backup designated (BDR), and others that are non-designated. If no router is DR or BDR on a given subnet, the BDR is first elected, and then a second election is held for the DR.s a step-by-step DR election example: How neighbor list, neighbor state, DR, and BDR are changed when receiving Hello) The DR is elected based on the following default criteria:

  • If the priority setting on an OSPF router is set to 0, that means it can NEVER become a DR or BDR (Backup Designated Router).
  • When a DR fails and the BDR takes over, there is another election to see who becomes the replacement BDR.
  • The router sending the Hello packets with the highest priority wins the election.
  • If two or more routers tie with the highest priority setting, the router sending the Hello with the highest RID (Router ID) wins. NOTE: a RID is the highest logical (loopback) IP address configured on a router, if no logical/loopback IP address is set then the Router uses the highest IP address configured on its active interfaces. (e.g. 192.168.0.1 would be higher than 10.1.1.2).
  • Usually the router with the second highest priority number becomes the BDR.
  • The priority values range between 0 – 255,with a higher value increasing its chances of becoming DR or BDR.
  • IF a HIGHER priority OSPF router comes online AFTER the election has taken place, it will not become DR or BDR until (at least) the DR and BDR fail.
  • If the current DR ‘goes down’ the current BDR becomes the new DR and a new election takes place to find another BDR. If the new DR then ‘goes down’ and the original DR is now available, still previously chosen BDR will become DR.

DR’s exist for the purpose of reducing network traffic by providing a source for routing updates. The DR maintains a complete topology table of the network and sends the updates to the other routers via multicast. All routers in a multi-access network segment will form a slave/master relationship with the DR. They will form adjacencies with the DR and BDR only. Every time a router sends an update, it sends it to the DR and BDR on the multicast address 224.0.0.6. The DR will then send the update out to all other routers in the area, to the multicast address 224.0.0.5. This way all the routers do not have to constantly update each other, and can rather get all their updates from a single source. The use of multicasting further reduces the network load. DRs and BDRs are always setup/elected on OSPF broadcast networks. DR’s can also be elected on NBMA (Non-Broadcast Multi-Access) networks such as Frame Relay or ATM. DRs or BDRs are not elected on point-to-point links (such as a point-to-point WAN connection) because the two routers on either sides of the link must become fully adjacent and the bandwidth between them cannot be further optimized. DR and non-DR routers evolve from 2-way to full adjacency relationships by exchanging DD, Request, and Update.

Backup designated router

backup designated router (BDR) is a router that becomes the designated router if the current designated router has a problem or fails. The BDR is the OSPF router with second highest priority at the time of the last election.

OSPF Router States

  1. Down State – No Hello received
  2. Init State – Hello received, but not with this router’s Router ID
 e.g. “Hi, my name is Carlos.”              “Hi, my name is Maria.”
  1. Two-way State – Hello received, and with this router’s Router ID
 e.g.  “Hi, Maria, my name is Carlos.”   “Hi, Carlos, my name is Maria.”
  1. ExStart State with DR and BDR
 Two-way State with all other routers
  1. Exchange State
  2. Loading State
  3. Full State (Routers are “fully adjacent”)

OSPF v3 Packet Formats

The “Main OSPF Packet Header” is the same for all 5 types of packets (with exception of the Type field) whereas the following sub-headers will vary from type to type and are shown below the Main OSPF Packet Header.

The Main OSPF Packet Header
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Version Type Packet Length
4 32 Router ID
8 64 Area ID
12 96 Checksum Instance ID 0

As per Appendix A.3 of RFC 5340 (OSPFv3 for IPv6) there are 5 OSPF Packet formats as follows:

Type Description
1 Hello
2 Database Description
3 Link State Request
4 Link State Update
5 Link State Acknowledgement

The five different formats for each “Type” of OSPF v3 packet are listed below:

Type 1: The Hello Packet
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 3 {Ver} 1 {Type} Packet Length
4 32 Router ID
8 64 Area ID
12 96 Checksum Instance ID 0
16 128 Interface ID
20 160 Rtr Priority Options (Explained below)
24 192 HelloInterval RouterDeadInterval
28 224 Designated Router ID
32 256 Backup Designated Router ID
36 288 Neighbor ID
~ ~
Type 2: The Database Description Packet
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 3 {Ver} 2 {Type} Packet Length
4 32 Router ID
8 64 Area ID
12 96 Checksum Instance ID 0
16 128 0 Options (Explained below)
20 160 Interface MTU 0 0 0 0 0 0 I M M
S
24 192 DD sequence number
28 224 An LSA Header
32 256
36 288
40 320
44 352
~ ~
Type 3: The OSPF Link State Request Packet
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 3 {Ver} 3 {Type} Packet Length
4 32 Router ID
8 64 Area ID
12 96 Checksum Instance ID 0
16 128 0 LS Type
20 160 Link State ID
24 192 Advertising Router
~ ~
Type 4: The OSPF Link State Update Packet
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 3 {Ver} 4 {Type} Packet Length
4 32 Router ID
8 64 Area ID
12 96 Checksum Instance ID 0
16 128 # LSAs
20 160 LSAs
24 192
28 224
32 256
36 288
~ ~
Type 5: The OSPF Link State Acknowledgement Packet
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 3 {Ver} 5 {Type} Packet Length
4 32 Router ID
8 64 Area ID
12 96 Checksum Instance ID 0
16 128 An LSA Header (Shown below)
20 160
24 192
28 224
32 256
~ ~

The OSPFv3 (24 Bit) Options Field

This “Options Field” is used in OSPF Hello packets, Database Description packets, and certain LSAs (router-LSAs, network-LSAs, inter-area-router-LSAs, and link-LSAs).
(Note: Previous OSPF versions {v1 & v2} DO NOT support all of the options/fields listed here.)
Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
* * DC R N x E V6
Explanation of the bits in the Options field:
There are currently only 7-bits assigned.
V6-bit: “V6” stands for IP[v6] routing calculations are to be used.
E-bit: “E” stands for [E]xternal as in AS-External-LSA flooding as specified in OSPFv2.
x-bit: This is currently deprecated. It was previously used by MOSPF.
N-bit: “N” stands for [N]SSA (Not So Stubby Area) and used for routers which are attached to NSSA networks.
R-bit: “R” stands for [R]outer and specifies whether the router is Active or not.
DC-bit: “DC” stands for [D]emand [C]ircuits and is specified in RFC 1793.
*-bits: These two bits are reserved for migration of OSPFv2 protocol extensions.
The remaining 16-bits have yet to be assigned.

OSPF in broadcast and non-broadcast networks

In broadcast multiple-access networks, neighbor adjacency is formed dynamically using multicast hello packets to 224.0.0.5. A DR and BDR are elected normally, and function normally.

For non-broadcast multiple-access networks (NBMA), RFC 2328 defined the following two official modes for OSPF:

  • nonbroadcast
  • point-to-multipoint

Cisco has defined the following three additional modes for OSPF in NBMA topologies:

  • point-to-multipoint nonbroadcast
  • broadcast
  • point-to-point

Ref :http://en.wikipedia.org/wiki/Open_Shortest_Path_First

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s