↪️
ccie.nyquist.eu
  • Table of Contents
  • Layer 2 Technologies
    • Ethernet Switching
      • L2 Switch Operations
      • Spanning Tree
        • 802.1d – STP
        • 802.1w – RSTP
        • 802.1s – MSTP
      • VTP 101
      • Private VLANs
      • VLANs
      • EtherChannel 101
    • Layer 2 WAN Protocols
      • HDLC
        • HDLC 101
      • PPP
        • PPP 101
        • PPP Authentication - PAP
        • PPP Authentication – CHAP
        • PPP Authentication – EAP
        • PPP Multilink
        • PPPoFR – PPP over Frame Relay
        • PPPoE – PPP over Ethernet
      • Frame Relay
        • Frame Relay 101
        • Frame Relay 102
        • Frame Relay Encapsulations – IETF vs Cisco
        • Multilink Frame Relay
        • Frame Relay Switching
        • Routing over Frame Relay
      • Bridging
        • Bridging on a router
        • MTU 101
    • Wireless
      • Wireless Principles
      • Wireless Implementations
      • Wireless Roaming
      • Wireless Authentication
        • WPA2 PSK
        • WPA2 802.1X
  • IPv4
    • IPv4 Addressing
      • Backup Interfaces
      • FHRP 101
      • DHCP 101
      • DNS 101
      • ARP 101
      • IPv4 101
      • Tunnel Interfaces
        • GRE Tunnels
      • BFD – Bidirectional Forwarding Detection
    • IPv4 Routing
      • How the routing table is built
        • How CEF works
        • Routing Order of Operations
        • NSF – Non Stop Forwarding
      • RIP
        • RIP 101
      • EIGRP
        • EIGRP 101
        • EIGRP Metric
        • More EIGRP Features
      • OSPF
        • OSPF 101
        • OSPF Areas
        • OSPF LSAs
        • OSPF Mechanics
      • IS-IS
        • IS-IS 101
        • IS-IS Mechanics – CLNP
      • BGP
        • BGP 101
        • BGP Attributes
        • More BGP
      • Route Redistribution
      • Policy based Routing
      • PfR 101 – Perfromance Routing
      • ODR
  • IPv6
    • IPv6-101
    • IPv6 Routing
    • Interconnecting IPv6 and IPv4
  • MPLS
    • MPLS 101
    • MPLS L3 VPN
  • Multicast
    • Multicast 101
    • PIM 101
    • IGMP 101
    • Inter Domain Multicast
    • IPv6 Multicast
    • Multicast features on switches
  • Security
    • NAT 101
    • NAT for Overlapping Networks
    • ACLs 101
    • ACLs 102
    • Cisco IOS Firewall
    • Zone Based Firewall
    • AAA 101
    • Controlling CLI Access
    • Control Plane
    • Switch Security
      • Switchport Traffic Control
      • Switchport Port Security
      • DHCP Snooping and DAI
      • 802.1x
      • Switch ACLs
    • IPSec VPN 101
      • IKE / ISAKMP 101
      • IPSEC Crypto Maps 101
      • IPSEC VTI 101
      • DMVPN 101
    • EAP 101
  • Network Services
    • NTP 101
    • HTTP 101
    • File Transfer 101 – TFTP & FTP
    • WCCP 101
  • QoS
    • QoS 101
    • Classification and Marking
    • Congestion Management
      • Legacy Congestion Management
      • SPD – Selective Packet Discard
      • CBWFQ
      • IP RTP Priority
    • Congestion Avoidance – WRED
    • Policing and Shaping
      • CAR 101
    • Compression and LFI
      • Header and Payload Compression
      • LFI for MultiLink PPP
    • Frame Relay QoS
      • Per VC Frame Relay QoS
    • RSVP 101
    • Switching QoS
  • Network Optimization
    • NetFlow 101 – TNF – Traditional NetFlow
    • NetFlow 102 – FNF – Flexible NetFlow
    • IP SLA 101
    • IP Accounting 101
    • Logging 101
    • SNMP and RMON 101
    • Cisco CLI Tips and Tricks
    • AutoInstall
    • Enhanced Object Tracking
    • Troubleshooting 101
    • SPAN, RSPAN, ERSPAN
  • Network Architecture
    • Hierarchical Network Architecture
    • SD Access
    • SD WAN
Powered by GitBook
On this page
  • OSPF Router ID
  • OSFP Network Types
  • Designated Router (DR) Election
  • Interface Status
  • Router Types
  • Virtual Links
  • OSPF over Demand Circuits
  • OSPF DNS Lookups

Was this helpful?

  1. IPv4
  2. IPv4 Routing
  3. OSPF

OSPF Mechanics

OSPF Router ID

Each router selects an OSPF Router ID when the OSPF process starts. The Router ID is a 32 bit number, usually written in dotted decimal format. The selection process is:

  1. Manually configured Router ID

    R(config-router)# router-id ROUTER-ID
  2. Highest Loopback IP address

  3. Highest non-Loopback “up/up” IP address

The interface used for Router ID doesn’t have to run OSPF and the router ID chosen when OSPF starts will remain even if the interface changes status or is deleted. To use a new Router ID, type:

R# clear ip ospf process

OSFP Network Types

Feature
Broadcast
Non-Broadcast
Point-to-point
Point-to-multipoint
Point-to-multipoint non-broadcast

Default for

Ethernet

FR physical, FR MP

FR P2P, PPP, HDLC, Tunnels

–

–

DR?

YES

YES

NO

NO

NO

Hello Timer

10 sec

30 sec

10 sec

30 sec

30 sec

Dead Timer

40 sec

120 sec

40 sec

120 sec

120 sec

Hellos to

224.0.0.5

Unicast

224.0.0.5

224.0.0.5

Unicast

Other packets to

224.0.0.5 (B)DR 224.0.0.6 DRO

Unicast

224.0.0.5

224.0.0.5

Unicast

Static Neighbor

CAN

MUST

NO

CAN

MUST

Multiple adjacencies

YES

YES

NO

YES

YES

Next hop for same segment

Advertising Router

Advertising Router

Self

Self

Self

Next hop for diff segment

Self

Self

Self

Self

Self

  • 224.0.0.5 is the All OSPF routers multicast address

  • 224.0.0.6 is the OSFP DRs mulsticast address

In addition to these network types there is the stub network type that is the default for loopback interfaces. The stub networks will be advertised as /32 routes regardless of the interface mask. To advertise the network according to the mask, the network type should be changed to point-to-point. The network type is independent of the interface type, and the default values can be changed with:

R(config-if)# ip ospf network {broadcast|non-broadcast|point-to-point|point-to-multipoint [non-broadcast]}

To verify the network type, use:

R# show ip ospf interface INTERFACE
R(config-if)# ip ospf hello-interval SEC
R(config-if)# ip ospf dead-interval SEC

To summarize, here’s what you need to remember:

Keyword
What it means
Network Type

If it contains the word POINT

  • No DR Election

  • Changes the next hop to self

  • Point-to-point

  • Point-to-multipoint

  • Point-to-multipoint non-broadcast

If it contains the word NON-BROADCAST

  • Sends packets as unicast

  • Requires static neighbors

  • Non-Braodcast

  • Point-to-multipoint non-broadcast

If it is usually used for Frame Relay

  • Slow Timers

  • Non-Braodcast

  • Point-to-multipoint

  • Point-to-multipoint non-broadcast

Designated Router (DR) Election

When an OSPF router becomes active, it checks for an active DR and BDR on the networks that have a type that requires such a process (broadcast and non-broadcast). The router will wait for WaitTimer (=RouterDead Interval) for a DR and BDR to be advertised in a Hello packet before starting an election process.

  • If a DR and BDR exist, the router accepts them

  • If there is no DR, but there is a BDR, the BDR becomes the DR and an election for BDR is held

  • If there is no BDR and no DR, an election is held for both DR and BDR

If an election takes place, this is how the DR is chosen:

  • The router with the highest priority becomes the DR/BDR (depending on the election type)

    R(config-if)# ip ospf priority PRI
    !Default: 1
    !0 = never become a DR
  • In case of a tie, the next criteria is highest Router ID

Since an existing DR and BDR is accepted, the first 2 routers that initialize on a Broadcast network will be selected as DR and BDR.

Interface Status

  • Down

  • Point-to-point – The router sends Hellos and will attempt to establish an adjacency with the other end of the link. Option is available for Point-to-point, point-to-multipoint and virtual links

  • Waiting – The router sends Hellos and waits for a Hello from DR and BDR. Option is available for Broadcast and NBMA networks

  • DR – The router is the DR and will establish adjacencies with the DROthers

  • Backup – The router is the BDR and will establish adjacencies with the DROthers

  • DROther – The router is neither DR nor BDR and will establish adjacencies only with the DR and BDR, but will send Hellos to all routers

  • Loopback – The interface is still advertised in Router LSAs even though packets cannot transit such an interfac

Router Types

  • Internal – All interfaces are in the same area

  • ABR (Area Border Router) – Has at least one interface in area 0 and one in another area

  • Backbone Routers – Routers with at least one interface in area 0

  • ASBR (AS Boundary Router – Gateways for external trafic, injecting routes form other protocols into OSPF

Virtual Links

Normally, traffic from one area to another must pass through Area 0. Sometimes, this is physically impossible, so the concept of virtual links was added. A virtual link can be used to create a neighbor adjacency for 2 routers that are not normally neighbors.

A virtual link extends area 0 from one ABR to another router in one of it’s non-zero areas. Therefore, the virtual link can only transit one area. A new adjacency will be formed over this virtual link so the area 0 extends to the other router, making it an ABR. The concept can be extended now, and a new virtual link can be created from this router to another router. Of course, the same rules apply.

Virtual Links cannot transit any flavor of stub areas.

To define a Virtual Link use the following command on the 2 ends of the virtual link. Of course, each router must reference the other router’s Router ID:

R(config-router)# area AREA virtual-link ROUTER-ID

If area 0 is set for authentication, then the virtual links must also be configured for authentication:

R(config-router)# area AREA virtual-link ROUTER authentication [message-digest]
! sets authentication as cleat text or MD5
R(config-router)# area AREA virtual-link ROUTER authentication-key CLEARTEXT-KEY
! sets clear text key
R(config-router)# area AREA_ID virtual-link ROUTER-ID message-digest-key KEY-ID md5 MD5-KEY
! sets md5 key

OSPF over Demand Circuits

Periodic Hellos are suppresed and periodic refreshes of LSAs are not flooded. The circuit is used only at the initial db sync and only when changes have occured, in order to send the updated LSAs. Hellos are still sent over multi-access networks, but are not sent on point to multipoint network types.

R(config-if)# ip ospf-demand-circuit

Only one end of the Poin-to-pont connection or the multipoint in a Point-to-multipoint need this setting

OSPF DNS Lookups

By default OSPF will not perform DNS lookup to translate the neighbor IP addresses to their hostnames. To enable, use:

R(config)#ip ospf name-lookup
PreviousOSPF LSAsNextIS-IS

Last updated 3 years ago

Was this helpful?

See this article about . Routers can become neighbors even if the network type is different, as long as they agree on 2 things: If a DR is required or not, and if the HELLO/DEAD timers are the same. You can’t change weather a DR is required or not, but you can change the timers with the following commands:

running OSPF over Frame Relay