How OSPF Packet Processes Work
Implementing a Network OSPF-Based Solution
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-1
Copyright By PowCoder代写 加微信 powcoder
OSPF Functions
High-level functions of OSPF include the following: Discover neighbors and form adjacencies
Flood link-state database (LSDB) information
Compute the shortest path
Install routes in the route-forwarding table
Additional functions of OSPF include the following:
Detect changes in the link state
Propagate changes to maintain link-state database synchronization
Several OSPF packet types are involved
© 2009 Cisco Systems, Inc. All rights reserved.
ROUTE v1.0—3-2
OSPF Packet Header Format
R1#debug ip ospf packet
OSPF packet debugging is on
*Feb 16 11:03:51.206: OSPF: rcv. v:2 t:1 l:48 rid:10.0.0.12
aid:0.0.0.1 chk:D882 aut:0 auk: from Serial0/0/0.2
This debug output shows fields in the OSPF header.
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-3
OSPF Packet Types
OSPF uses five types of routing protocol packets.
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-4
Neighbor Relationship: The Hello Packet
* Entries must match on neighboring routers
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-5
OSPF Routing Update Packets
Use of Multicast and unicast IP address Four types of update packets
LSDB synchronization process
– Discover neighbor
– Establish bidirectional communication
– Elect a designated router, if desired
– Form an adjacency
– Discover the network routes
– Update and synchronize link-state databases
© 2009 Cisco Systems, Inc. All rights reserved.
ROUTE v1.0—3-6
Establishing Bidirectional Communication
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-7
Discovering the Network Routes
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-8
Adding the Link-State Entries
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-9
OSPF Neighbor States
OSPF routers progress through seven states: Down: no active neighbor detected
INIT: hello packet received
Two-way: own router ID in received hello
Exstart: master and slave roles determined
Exchange: database description packets sent Loading: exchange of LSRs and LSUs
Full: neighbors fully adjacent
© 2009 Cisco Systems, Inc. All rights reserved.
ROUTE v1.0—3-10
Flooding Changes in Topology
Router R1 that detects a topology change adjusts its LSA and floods the LSA:
– Router R1 notifies all OSPF neighbors using 224.0.0.5, or, on LAN links, all OSPF DRs and BDRs using 224.0.0.6.
– The DR notifies others on 224.0.0.5.
The LSDBs of all routers must be synchronized.
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-11
The debug ip ospf packet Command
Debugging a single packet
R1#debug ip ospf packet
OSPF packet debugging is on
*Feb 16 11:03:51.206: OSPF: rcv. v:2 t:1 l:48 rid:10.0.0.12
aid:0.0.0.1 chk:D882 aut:0 auk: from Serial0/0/0.2
This debug output shows the fields in the OSPF header.
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-12
There are five OSPF packet types: hello, DBD, LSU, LSR, and LSAck.
The Hello protocol forms logical neighbor adjacency relationships. A DR may be required to coordinate adjacency formations.
The exchange protocol passes through several states
(down, INIT, two-way, exstart, exchange, and loading) before finally reaching the goal of the full state. When the protocol is in the full state, its databases are synchronized with adjacent routers.
LSAs are sent when a change occurs, but are also sent every 30 minutes to ensure database integrity. The maximum time that an LSA will stay in the database, without an update, is 1 hour.
Use the debug ip ospf packet command to verify that OSPF packets are flowing properly between two routers.
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—3-13
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com