OSPF (OPEN SHORTEST PATH FIRST) PROTOCOL
Open Shortest Path First (OSPF) is an open standards routing protocol that has been implemented by a wide variety of network vendors, including Cisco. This works by using the Dijkstra algorithm. First a shortest path tree is constructed, and then the routing table is populated with the resulting best paths. OSPF converges quickly, although perhaps not as quickly as EIGRP, and it supports multiple, equal-cost routes to the same destination. Like EIGRP, it does support both IP and IPv6 routed protocols.
OSPF provides the following features:
Consists of areas and autonomous systems
Minimizes routing update traffic
Allows scalability
Supports VLSM/CIDR
Has unlimited hop count
Allows multivendor deployment (open standard)
OSPF is supposed to be designed in a hierarchical fashion, which basically means you can separate the larger internetwork into smaller internetworks called areas. This is the best design for OSPF.
The reasons for creating OSPF in a hierarchical design include the following:
_ To decrease routing overhead
_ To speed up convergence
_ To confine network instability to single areas of the network
Dijkstra's algorithm, conceived by Dutch computer scientist Edsger Dijkstra in 1959, is a graph search algorithm that solves the single-source shortest path problem for a graph with nonnegative edge path costs, producing a shortest path tree. This algorithm is often used in routing. An equivalent algorithm was developed by Edward F. Moore in 1957.
For a given source vertex (node) in the graph, the algorithm finds the path with lowest cost (i.e. the shortest path) between that vertex and every other vertex. It can also be used for finding costs of shortest paths from a single vertex to a single destination vertex by stopping the algorithm once the shortest path to the destination vertex has been determined. For example, if the vertices of the graph represent cities and edge path costs represent driving distances between pairs of cities connected by a direct road, Dijkstra's algorithm can be used to find the shortest route between one city and all other cities. As a result, the shortest path first is widely used in network routing protocols, most notably IS-IS and OSPF (Open Shortest Path First).
Describes The Characteristics Of The RIP And OSPF Protocols Discussed Thus Far.
TABLE 4 . 9 Protocol Characteristics
Characteristic OSPF RIPv2 RIPv1
Type of protocol Link-state Distance Vector Distance-vector
Classless support Yes Yes No
VLSM support Yes Yes No
Auto summarization No Yes Yes
Manual summarization Yes No No
Discontiguous support Yes Yes No
Route propagation Multicast on change Periodic multicast Periodic broadcast
Path metric Bandwidth Hops Hops
Hop count limit None 15 15
Convergence Fast Slow Slow
Peer authentication Yes Yes No
Hierarchical network Yes (using areas) No (flat only) No (flat only)
Updates Event triggered Route table updates Route table updates
Route computation Dijkstra Bellman-Ford Bellman-Ford
CONFIGURING OSPF
Router(config)#router ospf ?
<1-65535> A value in the range 1–65,535 identifies the OSPF process ID. It’s a unique number on this router that groups a series of OSPF configuration commands under a specific running process. Different OSPF routers don’t have to use the same process ID in order to communicate. It’s purely a local value that essentially has little meaning, but it cannot start at 0. It has to start at a minimum of 1.
Lab_A(config)#router ospf 1
Lab_A(config-router)#network 10.0.0.0 0.255.255.255 area ? <0-4294967295> OSPF area ID as a decimal value/ A.B.C.D OSPF area ID in IP address format
SHOW OSPF COMMAND
show ip route Displays the router’s routing table
show ip ospf Displays OSPF information for one or all OSPF processes running on the router
show ip ospf database Shows the topological database used in OSPF
show ip ospf interface Displays all interface-related OSPF information
show ip ospf neighbor Summarizes the pertinent OSPF information regarding neighbors and the adjacency state
show ip ospf protocols Shows routing protocol information
Debugging OSPF Command
dubug ip ospf packet Shows hello packets being sent and received on your router.
debug ip ospf hello Shows hello packets being sent and received on your router.Shows more detail than the debug ip ospf packet output.
debug ip ospf adj Shows DR and DBR elections on a broadcast and nonbroadcast multiaccess network.
Router ID
Router(config)#router ospf 1 Starts OSPF process 1.
Router(config-router)#router-id 10.1.1.1 Sets the router ID to 10.1.1.1. If this command is used on an OSPF router process that is already active (has neighbors), the new router ID is used at the next reload or at a manual OSPF process restart.
Router(config-router)#no router-id 10.1.1.1 Removes the static router ID from the configuration. If this command is used on an OSPF router process that is already active (has neighbors), the old router ID behavior is used at the next reload
or at a manual OSPF process restart.
DR/BDR ELECTIONS
Router(config)#interface serial 0/0 Changes the router to interface configuration mode.
Router(config-if)#ip ospf priority 50 Changes the OSPF interface priority to 50.
NOTE: The assigned priority can be between 0 and 255. A priority of 0 makes the router ineligible to become a designated router (DR)
or backup designated router BDR). The highest priority wins the election. A priority of 255 guarantees a tie in the election. If all routers have the same priority, regardless of the priority number, they tie. Ties are broken by the highest router ID.
MODIFYING COST METRICS
Router(config)#interface serial 0/0 Changes the router to interface configuration mode.
Router(config-if)#bandwidth 128 If you change the bandwidth, OSPF recalculates the cost of the link.
OR
Router(config-if)#ip ospf cost 1564 Changes the cost to a value of 1564.
NOTE: The cost of a link is determined by dividing the reference bandwidth by the interface bandwidth. The bandwidth of the interface is a number between 1 and 10,000,000. The unit of measurement is kilobits. The cost is a number between 1 and 65,535. The cost has no unit of measurement—it is just a number.
TIMERS
Router(config-if)#ip ospf hellointerval timer 20 Changes the Hello Interval timer to 20 seconds.
Router(config-if)#ip ospf deadinterval 80 Changes the Dead Interval timer to 80 seconds.
NOTE: Hello and Dead Interval timers must match for routers to become neighbors.
PROPAGATING A DEFAULT ROUTE
Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0 Creates a default route.
Router(config)#router ospf 1 Starts OSPF process 1.
Router(config-router)#default-information originate Sets the default route to be propagated to all OSPF routers.
Router(config-router)#default-information originate always The always option propagates a default “quad-zero” route even if one is not
configured on this router.
NOTE: The default-information originate command or the defaultinformation originate always command is usually only to be configured on your “entrance” or “gateway” router, the router that connects your network to the outside world—the Autonomous System
Boundary Router (ASBR).
Verifying SHOW OSPF Command
Router#show ip protocol Displays parameters for all protocols running on the router
Router#show ip route Displays a complete IP routing table
Router#show ip ospf Displays basic information about OSPF routing processes
Router#show ip ospf interface Displays OSPF info as it relates to all interfaces
Router#show ip ospf interface fe 0/0 Displays OSPF information for interface fastethernet 0/0
Router#show ip ospf border-routers Displays border and boundary router information
Router#show ip ospf neighbor Lists all OSPF neighbors and their states
Router#show ip ospf neighbor detail Displays a detailed list of neighbors
Router#show ip ospf database Displays contents of the OSPF database
Router#show ip ospf database nssa-external Displays NSSA external link states
Troubleshooting OSPF
Router#clear ip route * Clears entire routing table, forcing it to rebuild
Router#clear ip route a.b.c.d Clears specific route to network a.b.c.d
Router#clear ip opsf counters Resets OSPF counters
Router#clear ip ospf process Resets entire OSPF process, forcing OSPF to re-create neighbors, database,
and routing table
Router#debug ip ospf events Displays all OSPF events
Router#debug ip ospf adjacency Displays various OSPF states and DR/BDR election between adjacent routers
Router#debug ip ospf packets Displays OPSF packets
Wednesday, May 5, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment