Single-Area OSPF

OSPF(Open Shortest Path First), a link-state routing protocol. classless routing protcols uses the concept of areas for scalability.

OSPF is a protocol witch uses cost as a metric.

 

1. Characteristics of OSPF

1.1 OSPF History

 
  Interior Gateway Protocol Exterior Gateway Protocols
  Distance Vector Link-State Path Vector
IPv4 RIPv2 EIGRP OSPFv2 IS-IS BGP-4
IPv6 RIPng EIGRP for IPv6 OSPFv3 IS-IS For IPv6 BGP-MP

The initial development of OSPF began in 1987 by the IETF OSPF Working Group. At that time, the Internet was largely an academic and research network funded by the U.S. government.

 

In 1989, the specification for OSPFv1 was published in RFC 1131. Two implementations were written. One implementation was developed to run on routers and the other to run on UNIX workstations. The latter implementation became a widespread UNIX process known as GATED. OSPFv1 was an experimental routing protocol and was never deployed.

 

In 1991, OSPFv2 was introduced in RFC 1247 by John Moy. OSPFv2 offered significant technical improvements over OSPFv1. It is classless by design; therefore, it supports VLSM and CIDR.

 

At the same time the OSPF was introduced, ISO was working on a link-state routing protocol of their own, Intermediate System-to-Intermediate System (IS-IS). IETF chose OSPF as their recommended Interior Gateway Protocol (IGP).

 

In 1998, the OSPFv2 specification was updated in RFC 2328, which remains the current RFC for OSPF.

 

In 1999, OSPFv3 for IPv6 was published in RFC 2740. OSPF for IPv6, created by John Moy, Rob Coltun, and Dennis Ferguson, is not only a new protocol implementation for IPv6, but also a major rewrite of the operation of the protocol.

 

In 2008, OSPFv3 was updated in RFC 5340 as OSPF for IPv6.

 

1.2 OSPF Feature

  •     Classless - It is classless by design; therefore, it supports VLSM and CIDR.
  •     Efficient - Routing changes trigger routing updates (no periodic updates). It uses the SPF algorithm to choose the best path.
  •     Fast convergence - It quickly propagates network changes.
  •     Scalable - It works well in small and large network sizes. Routers can be grouped into areas to support a hierarchical system.
  •     Secure - It supports Message Digest 5 (MD5) authentication. When enabled, OSPF routers only accept encrypted routing updates from peers with the same pre-shared password.

 

Cisco AD Value

 

Route Source Administrative Distance
Connected 0
Static 1
EIGRP summary route 5
External BGP 20
internal EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120
External EIGRP 170
Internal BGP 200

NOTE: Administrative distance (AD) is the trustworthiness (or preference) of the route source.

OSPF has a default administrative distance of 110.

 

1.3 OSPF Data Structures

Database Table Description
Adacency Database Neighbor Table

1. List of all neighbor routes to which a router has established bidirection communication

2. This table is unique for eatch router

3. Can be viewed using the show ip ospf neighbor command

Link-State Database(LSDB) Topology Table

1. Lists information about all other routers in the network

2. The database represents the netwrok topology.

3. All routers within an area have identical LSDB.

4. Can be viewed using the show ip ospf database command.

Forwarding Database Routing Table

1. List of routes generated when an algorithm is run on the link-state database.

2. Each router's routing table is unique and contains information on how and where to send packets to other routers

3. can be viewed using the show ip route command.

 

1.4 Routing Protocol Messages

OSPF exchanges messages to convey routing information using five types of packets.

  •     Hello packet
  •     Database description packet
  •     Link-state request packet
  •     Link-state update packet
  •     Link-state acknowledgment packet

 

1.5 Algorithm

The CPU processes the neighbor and topology tables using Dijkstra’s SPF algorithm.

The SPF algorithm is based on the cumulative cost to reach a destination.

 

The SPF algorithm creates an SPF tree by placing each router at the root of the tree and calculating the shortest path to each node.

The SPF tree is then used to calculate the best routes. OSPF places the best routes into the forwarding database, which is used to make the routing table.

 

1.6 OSPF Area

 

Single-Area OSPF      Single-Area OSPF

 

The hierarchical-topology possibilities of multiarea OSPF have these advantages:

  •     Smaller routing tables - Fewer routing table entries because network addresses can be summarized between areas. Route summarization is not enabled by default.
  •     Reduced link-state update overhead - Minimizes processing and memory requirements.
  •     Reduced frequency of SPF calculations - Localizes the impact of a topology change within an area. For instance, it minimizes routing update impact because LSA flooding stops at the area boundary.

 

2. OSPF Messages

Single-Area OSPF

 

 

 2.1 OSPF Packet Description

Type Packet Name Description
1 Hello Discovers neighbors and builds adjacencies between them
2 DBD Checks for database synchronization between routers
3 LSR Request specivic link-state records from router to router
4 LSU Sends specivically requested link-state records
5 LSAck Acknowledges the other packet types

 

 

Hello Packet

 Single-Area OSPF

 

 

The OSPF Type 1 packet is the Hello packet. Hello packets are used to:

  •     Discover OSPF neighbors and establish neighbor adjacencies.
  •     Advertise parameters on which two routers must agree to become neighbors.
  •     Elect the Designated Router (DR) and Backup Designated Router (BDR) on multiaccess networks like Ethernet and Frame Relay. Point-to-point links do not require DR or BDR.

 

The figure displays the fields contained in the Type 1 Hello packet. Important fields shown in the figure include:

  •     Type - Identifies the type of packet. A one (1) indicates a Hello packet. A value 2 identifies a DBD packet, 3 an LSR packet, 4 an LSU packet, and 5 an LSAck packet.
  •     Router ID - A 32-bit value expressed in dotted decimal notation (an IPv4 address) used to uniquely identifying the originating router.
  •     Area ID - Area from which the packet originated.
  •     Network Mask - Subnet mask associated with the sending interface.
  •     Hello Interval - Specifies the frequency, in seconds, at which a router sends Hello packets. The default Hello interval on multiaccess networks is 10 seconds. This timer must be the same on neighboring routers; otherwise, an adjacency is not established.
  •     Router Priority - Used in a DR/BDR election. The default priority for all OSPF routers is 1, but can be manually altered from 0 to 255. The higher the value, the more likely the router becomes the DR on the link.
  •     Dead Interval - Is the time in seconds that a router waits to hear from a neighbor before declaring the neighboring router out of service. By default, the router Dead Interval is four times the Hello interval. This timer must be the same on neighboring routers; otherwise, an adjacency is not established.
  •     Designated Router (DR) - Router ID of the DR.
  •     Backup Designated Router (BDR) - Router ID of the BDR.
  •     List of Neighbors - List that identifies the router IDs of all adjacent routers.

 

LSU

Single-Area OSPF

    1. Type 1 LSA include a list of directly connected network prefixes and link types.
    2. All routers generate type 1 LSA
    3. Type 1 LSA are flooded within the area and do not propagate beyond an ABR.
    4. A type 1 LSA link-state ID is identified by the router ID of the originating router.

 

    1. Type 2 LSA identify the routers and the network addresses of the multiaccess links
    2. Only a DR generates a type 2 LSA
    3. Type 2 LSA are flooded within the multiaccess network and do not go beyond an ABR
    4. A type 2 LSA link-state ID is identified by the DR router ID

 

    1. A type 3 LSA describes a network address learned by type 1 LSA
    2. A type 3 LSA is required for every subnet.
    3. ABR flood type 3 LSA to other areas and are regenerated by other ABR
    4. A type 3 LSA link-state ID is identified by the network address
    5. By default, routers are not summarized.

 

    1. Type 4 LSA are used to advertise an ASBR to other areas and provide a route to the ASBR
    2. ABR generate type 4 LSA
    3. A type 4 LSA is generated by the originating ABR and regenerated by other ABR
    4. A type 4 LSA link-state ID is identified by the router ID of the ASBR.

 

    1. type 5 LSA are used to advertise external network addresses.
    2. An ASBR generates a type 5 LSA
    3. Type 5 LSA are flooded throughout the area and regenerated by other ABR
    4. A type 5 LSA link-state ID is the external network address
    5. By default, routes are not summarized

 

 

3. OSPF Operation

Single-Area OSPF

Down State 

  • No Hello Packets received = Down
  • Router sends Hello packets
  • Transition to init state

init State

 

  • Hello packets are received from the neighbor.
  • They contain the sending router's Router ID
  • Transition to Two-Way State

Two-Way State

 

  • On Ethernet links, elect a DR and BDr
  • Transiiton to Exstart State

ExStart State

 

  • Negotiate master/slave relationship and DBD packet sequence number
  • The master initiates the DBD packet exchange.

Exchange State

 

  • Routers exchange DBD packets
  • if additional router information is required then transition to loading; otherwise, tansition to Full

Loading State

 

  • LSRs and LSUs are used to gain additional route information
  • Routes are processed using the SPF algorithm.
  • Transition to the Full State.

Full State

 

  • Routers have converged.

 

你可能感兴趣的:(OS)