OSPF Flashcards
OSPF Characteristics
Open standard link state protocol
Supports large networks
Very fast convergence time
Messages sent via multicast (224.0.0.5)
Uses Dijkstra’s Shortest Path First algorithm to determine the best path to learn networks
OSPF Operations
Discover neighbors
Form adjacencies
Flood Link State Database (LSDB)
Compute Shortest Path
Install best routes in routing table
Respond to network changes
OSPF Packet Types: Hello
A router will send out & listen for hello packets when OSPF is enabled on an interface, & form adjacencies with other OSPF routers on the link
Multicast to 224.0.0.5
OSPF Packet Types: DBD
DataBase Description:
Adjacent routers will tell each other the networks they know about with the DBD packet
OSPF Packet Types: LSR
Link State Request:
If a router is missing info about any of the networks in the received DBD, it will send the neighbor an LSR
OSPF Packet Types: LSA
Link State Advertisement:
A routing update
OSPF Packet Types: LSU
Link State Update:
Contains a list of LSA’s which should be updated, used during flooding
OSPF Packet Types: LSAck
Link State Acknowledgement:
Receiving routers acknowledge LSAs
Hello Packet Contents
Router ID: 32 bit unique ID for each OSPF router
Hello Interval: How often packets are sent (10 sec default)
Dead Interval: How long router waits to hear from a neighbor before declaring it out of service
Neighbors: List of adjacent OSPF routers that this router has received Hello packet(s) from
Area ID: The area configured for that interface
Router Priority: An 8 bit number used to select DR & BDR
DR & BDR IPv4 Address: If known
Authentication Flag: Authentication details if configured
Stub Area Flag: If the area is a stub area. Stub areas have a default route to their ABR rather than learning routes outside the area
OSPF Adjacency Matching Requirements
Must be in each other’s Neighbor list
Hello & Dead intervals
Area ID
IP Subnet
Authentication Flag
Stub Area Flag
MTU Size (Default 1500)
Command: Configure OSPF with Process ID of 1 for 10.0.0.0/24 and 10.1.0.0/24 networks in area 0
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
network 10.1.0.0 0.0.0.255 area 0
OSPF Verification Commands
Show run | section ospf
Show ip protocols
Show ip ospf neighbor
Show ip route
Show ip ospf database
Show ip ospf int brief
OSPF Router ID
Used by OSPF routers to identify themselves
Takes form of an IP address
Defaults to being the highest IP of any loopback interfaces configured, or the highest other IP address if a loopback doesn’t exist
Can be manually specified
Command: Set OSPF Router ID to 2.2.2.2
router ospf 1
router-id 2.2.2.2
Must restart for changes to take place:
clear ip ospf process
Command: Set interface FastEthernet2/0 to Passive Interface
router ospf 1
passive-interface f2/0
Command: Set passive interface as default
Also, remove an interface from being passive
router ospf 1
passive-interface default
To remove this setting on an interface:
no passive-interface f0/0
Command: Default OSPF route injection
router ospf 1
default-information originate
OSPF Two Level Hierarchy
Transit Area (backbone/area 0): Does not generally contain end users
Regular Area (nonbackbone areas): Used to connect end users to the transit area
Small networks do not require hierarchical design & all routers can be area 0
OSPF Router Types: Backbone Routers
Routers which have all their OSPF interfaces in Area 0
OSPF Router Types: ABRs
Routers which have interfaces in multiple areas
Separates LSA flooding zones - Segregates the network
It becomes the primary point for area address summarization
Functions regularly as the source for default routes
Maintains the LSDB for each area which it’s connected to
Manual summarization (if not configured, all routes flooded everywhere)
OSPF Router Types: Normal Area Routers
Routers which have all their OSPF interfaces in a normal area
Maintain full LSDB of other routers & links in own area
Learn IA routes to other areas from their ABRs
OSPF Router Types: IA Routers
Inter-Area Routers:
Routers to other areas appear in routing table as IA routes
OSPF Router Types: ASBR Routers
Routers which redistribute into OSPF
OSPF Router Types: External Routes
Routes which are redistributed into OSPF appear as external routes
Command: ABR Manual Summarization
router ospf 1
Network 10.1.0.0 0.0.255.255 area 0
Network 10.0.0.0 0.0.255.255 area 1
Area 0 range 10.1.0.0 255.255.0.0
Area 1 range 10.0.0.0 255.255.0.0
OSPF: Speed
The rate that ethernet interfaces physically transmit at is set by the speed command
If you use the “speed 10” command on a FastEthernet interface, it will physically transmit at 10Mbps
OSPF: Clock Rate
The rate that serial interfaces physically transmit it set by the “clock rate” command
Serial interfaces transmit at 1.544Mbps by default
If you use the “clock rate 64000” command on a serial interface, it will physically transmit at 64Kbps
OSPF: Bandwidth
Bandwidth usually matches physical transmission rate of interface
The bandwidth setting on an interface does not affect the physical transmission rate (that is set by “speed” or “clock rate”
The bandwidth command affects software policy on the router, such as which path will be selected by EIGRP/OSPF, or how much bandwidth will be guaranteed to a traffic type by QoS
OSPF Metric Calculation
For destinations in its own area, a router looks at all available links to get there, & chooses the path with the lowest overall cost
For destinations in another area, a router looks at all available links to get to the ABR & chooses the path with the lowest overall cost to the ABR.
It’s then up to the ABR to choose the best path onward from there
SPF Algorithm
Calculates overall cost for each available path to each destination network
Then selects lowest cost path
Overall cost = cumulative cost of all outgoing interfaces
You should ensure the cost is set the same on the interfaces on both sides of a link or you can get asymmetric routing
Reference Bandwidth
The cost is automatically derived from the interface bandwidth
Cost = Reference Bandwidth / Interface Bandwidth
The default reference bandwidth is 100Mbps
Best possible cost is 1
OSPF treats all interfaces of 100+Mbps as equal (can cause undesirable routing)
Command: Change OSPF Reference Bandwidth
Router ospf 1
Auto-cost reference-bandwidth 100000
Command: Manipulate OSPF Metric by changing the cost on FastEthernet0/0
interface f0/0
ip ospf cost 50
Command: Verify OSPF cost on FastEthernet0/0
show ip ospf interface FastEthernet0/0
OSPF Neighbor State Summary
Down: No active neighbor detected
INIT: Hello packet received from neighbor
2-Way: Own router ID in received hello
Exstart: Primary & secondary roles determined
Exchange:Database description packets sent
Loading: Exchange of LSRs & LSUs
Full: Neighbors fully adjacent
Command: Change Hello Timer
ip ospf hello-interval 5
DR & BDR
Designated Router & Backup Designated Router:
The router with the highest priority becomes DR
2nd highest priority becomes BDR
Default priority is 1; higher the better (0-255)
Highest Router ID is used in case of a tie
Selected at 2-Way Stage
No election on point-to-point links
Establish FULL neighbor state with all routers on network segment
When a link state changes on a router in a multiaccess segment
Sends LSU packet to 224.0.0.6 (all designated routers)
DR multicasts update to 224.0.0.5 (all OSPF routers)
Command: Set OSPF priority to 100 on FastEthernet0/0
interface f0/0
ip ospf priority 100
Command: Make sure a router is not a DR/BDR on FastEthernet0/0
interface f0/0
ip ospf priority 0