OSPF main features
| Attributes |
| Type |
Link-State |
| Metric |
Cost (Bandwidth) |
| Protocols |
IPv4, IPv6 |
| Administrative Distance |
110 |
| Transport |
IP/89 |
| Authentication |
Plaintext, MD5 |
| AIISPF Address |
224.0.0.5 |
| AIIDR Address |
224.0.0.6 |
| Standards |
RFC 2380,2740 |
| Algorithm |
Dijkstra |
| Protocol Data Unit (PDU) |
| 8 |
16 |
24 |
32 |
| Version |
Type |
Length |
| Router ID |
| Area ID |
| Checksum |
Instance ID |
Reserved |
| Data |
Router Types
- Internal Router - All interfaces reside within the same area
- Backbone Router - A router with an interface in area 0 (the backbone)
- Area Border Router (ABR) - Connects two or more areas
- AS Boundary Router (ASBR) - Connects to additional routing domains; backbone
Area Types
- Standard Area - Default OSPF area type
- Stub Area - External link (type 5) LSAs are replaced with a default route
- Totally Stubby Area - Type 3,4 and 6 LSAs are replaced with a default route
- Not So Stubby Area (NSSA) - A stub area containing an ASBR; type 5 LSAs are converted to type 7 within the area
Link State Advertisements
- Router Link (Type 1): Lists neighboring routers and the cost to each; flooded within an area.
- Network Link (Type 2): Generated by a DR; lists all routers on an adjacent segment; flooded within an area.
- Network Summary (Type 3): Generated by an ABR and advertised among areas.
- ASBR Summary (Type 4): Injected by an ABR into the backbone to advertise the presence of an ASBR within an area.
- External Link (Type 5): Generated by an ASBR and flooded throughout the AS to advertise a route external to OSPF.
- NSSA External Link (Type 7): Generated by an ASBR in a not-so-stubby area; converted into a type 5 LSA by the ABR when leaving the area.
Adjacency States
- Down: No hello packets have been received from this neighbor yet.
- Attempt: Router sends unicast hello packets withing dead interfal.
- Init: Router has received a hello packet where its own router ID is not included.
- 2-Way: Bi-directional communication has started, both routers have received hello packages with their own router ID included in it. (Designated Router)DR/(Backup Designated Router)BDR Election takes place
- Exstart: In this state, the routers and their DR and BDR establish a master-slave relationship and choose the initial sequence number for adjacency formation; higher router ID becomes the master.
- Exchange: OSPF routers exchange database descriptor (DBD) packets.
- Loading: Routers send link-state request packets; link-state update(LSU)/link-state request(LSR).
- Full: Fully adjacent; link-state acknowledge(LSA) are exchanged. Database descriptors(DBD) are fully synchronized.
DR/BDR Election
- The DR serves as a common point for all adjacencies on a multiaccess segment.
- The BDR also maintains adjacencies with all routers in case the DR fails.
- Election does not occur on point-topoint or multipoint links.
- Default priority (0-255) is 1; highest priority wins; 0 cannot be elected.
- DR preemption will not occur unless the current DR is reset.
Virtual Links
- Tunnel formed to join two areas across an intermediate
- Both end routers must share a common area
- At leaset one end must reside in area 0
- Cannot traverse stub areas
How to configure OSPF
How to configure routing protocol and directly connected networks.
router# config t
router(config)# router ospf < process number >
router(config-router)# network < ip address > < wildcard subnetmask > area < area number >
router(config-router)# end
router# wr
How to configure interfaces
router> enable
router# config t
router(config)# interface < interface >
router(config-if)# ip address < ip addr. > < subnetmask >
router(config-if)# no shutdown
Additional configuration commands
router(config-router)# redistribute static subnets
router(config-router)# ip ospf authentication message-digest
router(config-router)# ip ospf message-digest-key 1 md5 < keyname >
router(config-router)# ip ospf priority < number >
Troubleshooting
router# show ip { route | protocols }
router# show ip ospf interface
router# show ip ospf neightbor
router# show ip ospf border-routers
router# show ip ospf virtual-links
router# debug ip ospf [...]
Source PacketLife