Ospf Cheat Sheet

Ospf Cheat Sheet

Overview

TypeLink-State
AlgorithmDijkstra
MetricCost
AD110
StandardRFC 2328, 2740
ProtocolsIP
TransportIP/89
AuthenticationPlaintext, MD5

Router ID Selection

  1. Configured with router-id command.
  2. If not manually configured, selects the highest IP address on any loopback interface in “up/up” state.
  3. If no loopback interfaces, selects the highest IP address on any non-loopback interface in “up/up” state.

OSPF Network Types

  • Broadcast: Default for Ethernet networks.
  • Non-Broadcast Multi-Access (NBMA): Used for networks like Frame Relay.
  • Point-to-Point: Direct connection between two routers.
  • Point-to-Multipoint: One router connected to multiple routers.

OSPF Packet Types

  1. Hello: Establishes and maintains neighbor relationships.
  2. Database Description (DBD): Summarizes the database contents.
  3. Link-State Request (LSR): Requests specific link-state records.
  4. Link-State Update (LSU): Sends link-state records.
  5. Link-State Acknowledgment (LSAck): Acknowledges receipt of link-state records.

Link State Advertisements

  1. Router Link (Type1)
  2. Network Link (Type2)
  3. Network Summary (Type 3)
  4. ASBR Symmary (Type 4)
  5. External Link (Type 5)
  6. NSSA External Link (Type 7)

OSPF States

  • Down: No Hello packets received.
  • Init: Hello packets received but no bidirectional communication.
  • 2-Way: Bidirectional communication established.
  • ExStart: Beginning of database exchange.
  • Exchange: Routers exchange DBD packets.
  • Loading: LSR packets sent to neighbors.
  • Full: Routers are fully adjacent.

OSPF Area Types

  • Backbone Area (Area 0): Central area to which all other areas connect.
  • Stub Area: Does not receive external routes.
  • Totally Stubby Area: Only receives default route from ABR.
  • Not-So-Stubby Area (NSSA): Allows external routes but restricts certain types. Useful Commands show ip ospf neighbor: Displays OSPF neighbor information. show ip ospf: Displays general OSPF information. show ip protocols: Displays routing protocol information.

Cisco IOS Configuration Examples

Basic OSPF Configuration

router ospf 1
router-id 1.1.1.1
network 192.168.2.0 0.0.0.255 area 0

Configuring OSPF Authentication
interface GigabitEthernet0/0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 YOUR_PASSWORD
Last updated on