« CCNP BSCI Notes – Scalable EIGRP | Main | Cisco Press – Implementing Cisco IOS Network Security (IINS) (Self-Study)(640-553) »
CCNP BSCI Notes – Understanding Simple Single-Area OSPF
By Raiy Wong | November 19, 2009
OSPF Fundamentals
Link-state routing protocols utilize more internal resources in favor of reducing bandwidth consumption.
All OSPF routers in an area share the same Link State Database (LSDB).
Link State Advertisements (LSAs) are flooded to all neighboring routers.
OSPF tables:
Neighbor table
Topology database
Routing table
Forming adjacencies
Routers multicast hellos to 224.0.0.5 every 10 seconds on a broadcast link and every 30 seconds on a nonbroadcast link.
Once hellos are exchanged, neighboring routers add one another to their neighbor tables.
Contents of a hello packet:
Router ID – 32-bit unique number (IP address)
Hello/dead intervals – Timers
Neighbor list – List of neighboring router IDs
Area ID
Priority – Used in electing the DR and BDR
DR and BDR
Authentication (if enabled)
Stub Area Flag – On if this is a stub area
Neighbor states:
Down
Attempt – Used for manually configured neighbors on an NBMA link; unicast hellos sent to neighbor from which hellos have stopped being received
Init – Hello packet received from neighbor, but without the recipient’s router ID
2-Way – Bi-directional communication has been established
Exstart – The DR and BDR have been elected, link-state exchange starting
Exchange – Exchange of database descriptor (DBD) packets
Loading – Exchange of link-state information
Full – Full adjacency established
Example OSPF packet capture
Cisco OSPF will load balance over up to four equal-cost links; configurable up to six.
Designated Routers
Neighbors on a broadcast segment elect a designated router (DR) and backup designated router(BDR), which peer with all other routers on the segment. All non-designated routers peer only with the DR and BDR.
Multicast destinations:
224.0.0.5 – All OSPF routers
224.0.0.6 – All designated OSPF routers (DR and BDR only)
DRs are chosen based on priority (0 – 255). 1 is default; routers with 0 priority will never be elected.
Priority ties are broken by choosing the higher router ID.
DRs are elected on point-to-point Ethernet links even though this is unnecessary (Ethernet is always seen as a broadcast medium). Interfaces can be configured to operate in point-to-point mode to prevent this.
(B)DRs are not preempted. New election will take place only when a current (B)DR goes offline or its
OSPF process is administratively restarted.
Areas
All routers in an area maintain an identical topological database.
Areas are defined to logically segment a network and reduce routing table size and complexity.
All areas connect to area 0 (the backbone area).
Router types:
Backbone routers – Routers in area 0
Area Border Routers (ABRs) – Routers in multiple areas
Autonomous System Boundary Routers (ASBR) – Routers which redistribute information from another AS
Internal – Routers which have all interfaces in a single area
Routers can fill multiple roles.
Packet Types
OSPF is IP protocol 89.
Hello – Used to establish communication with directly connected neighbors
Database Descriptor (DBD) – Lists router IDs from which the router has an LSA and its current sequence number
Link State Request (LSR) – Request for an LSA
Link State Update (LSU) – Reply to an LSR with the requested information
Link State Acknowledgment (LSAck) – Used to confirm receipt of link-state information
Packet Fields
Version – Version of OSPF being run
Type
Length
Router ID
Area ID
Checksum
Authentication type (none/plaintext/md5)
Authentication data
Data
Configuring OSPF in a Single Area
Necessary information:
OSPF process ID (locally significant)
Participating interfaces
Area ID
Router ID
Enable OSPF
Configure Included Networks
A single interface can be specified by supplying its IP address and a null wildcard mask: network 192.168.0.1 0.0.0.0 area 0
Router ID
If no router ID has been administratively declared, a router will choose the highest loopback IP address.
If no loopback addresses are present, the highest IP address of the first active interface will be used.
A router ID can be manually specified:
Best practice dictates the creation of a loopback address to be used as the router ID for stability and continuity:
Default Cost
Link cost is a 16-bit value (0-65535); default cost is calculated as 100Mbps/interface bandwidth.(Interfaces 100Mbps and faster are assigned a cost of 1.)
OSPF cost can be manually specified per interface:
An alternative to defining static costs per interface is to change the numerator bandwidth (default100Mbps):
Reference speed is a 32-bit value (1 – 4294967). If reference speed is modified, the same modification should be performed on all routers within the area.
Router Priority
Default DR election priority is 1, and a router with a priority of 0 will not become a DR. Priority range is 0 – 255.
Verifying OSPF Configuration
show ip ospf – OSPF process details
show ip ospf database – Contents of the topology database
show ip ospf interface – Interfaces participating in OSPF
show ip ospf neighbor – Neighbor information
show ip protocols – Displays all active routing protocols
show ip route
debug ip ospf events
debug ip packet
Topics: CCNP, CCNP Notes | No Comments »
Comments
You must be logged in to post a comment.