Friday 6 March 2015

OSPF (Cont.)

SPF algorithm: - The Shortest Path First (SPF) routing algorithm is the basis for OSPF operations. When an SPF router is powered up, it initializes its routing-protocol data structures and then waits for indications from lower-layer protocols that its interfaces are functional.
After a router is assured that its interfaces are functioning, it uses the OSPF Hello protocol to acquire neighbors, which are routers with interfaces to a common network. The router sends hello packets to its neighbors and receives their hello packets. In addition to helping acquire neighbors, hello packets also act as keepalives to let routers know that other routers are still functional.
On multiaccess networks (networks supporting more than two routers), the Hello protocol elects a designated router and a backup designated router. Among other things, the designated router is responsible for generating LSAs for the entire multiaccess network. Designated routers allow a reduction in network traffic and in the size of the topological database.
When the link-state databases of two neighboring routers are synchronized, the routers are said to be adjacent. On multiaccess networks, the designated router determines which routers should become adjacent. Topological databases are synchronized between pairs of adjacent routers. Adjacencies control the distribution of routing-protocol packets, which are sent and received only on adjacencies.
Each router periodically sends an LSA to provide information on a router's adjacencies or to inform others when a router's state changes. By comparing established adjacencies to link states, failed routers can be detected quickly, and the network's topology can be altered appropriately. From the topological database generated from LSAs, each router calculates a shortest-path tree, with itself as root. The shortest-path tree, in turn, yields a routing table.
Packet Format:- All OSPF packets begin with a 24-byte header, as illustrated in Figure: OSPF Packets Consist of Nine Fields.
Figure: OSPF Packets Consist of Nine Fields
CT844602.jpg
The following descriptions summarize the header fields:
  • Version number - Identifies the OSPF version used.
  • Type - Identifies the OSPF packet type as one of the following:
    • Hello - Establishes and maintains neighbor relationships.
    • Database description - Describes the contents of the topological database. These messages are exchanged when an adjacency is initialized.
    • Link-state request - Requests pieces of the topological database from neighbor routers. These messages are exchanged after a router discovers (by examining database-description packets) that parts of its topological database are outdated.
    • Link-state update - Responds to a link-state request packet. These messages also are used for the regular dispersal of LSAs. Several LSAs can be included within a single link-state update packet.
    • Link-state acknowledgment - Acknowledges link-state update packets.
  • Packet length - Specifies the packet length, including the OSPF header, in bytes.
  • Router ID - Identifies the source of the packet.
  • Area ID - Identifies the area to which the packet belongs. All OSPF packets are associated with a single area.
  • Checksum - Checks the entire packet contents for any damage suffered in transit.
  • Authentication type - Contains the authentication type. All OSPF protocol exchanges are authenticated. The authentication type is configurable on per-area basis.
  • Authentication - Contains authentication information.
  • Data - Contains encapsulated upper-layer information


Additional Features: - Additional OSPF features include equal-cost, multipath routing, and routing based on upper-layer type-of-service (TOS) requests. TOS-based routing supports those upper-layer protocols that can specify particular types of service. An application, for example, might specify that certain data is urgent. If OSPF has high-priority links at its disposal, these can be used to transport the urgent datagram.

OSPF supports one or more metrics. If only one metric is used, it is considered to be arbitrary, and TOS is not supported. If more than one metric is used, TOS is optionally supported through the use of a separate metric (and, therefore, a separate routing table) for each of the eight combinations created by the three IP TOS bits (the delay, throughput, and reliability bits). For example, if the IP TOS bits specify low delay, low throughput, and high reliability, OSPF calculates routes to all destinations based on this TOS designation.
IP subnet masks are included with each advertised destination, enabling variable-length subnet masks. With variable-length subnet masks, an IP network can be broken into many subnets of various sizes. This provides network administrators with extra network-configuration flexibility.

No comments:

Post a Comment