Single-Area OSPF
From Mycomputer Notes
(→Configuring Basic OSPF) |
|||
(42 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | + | OSPF is a link state routing protocol that is based on a open standard, meaning open to the public and is non proprietary. OSPF is the preffered IGP if comparaed to RIP (v1&v2); it the prefered IGP because it is '''scalable'''. | |
+ | OSPF gives majors advantages to the administrator and it gives them extensive control of the routing updates, Area definition reduces routing overhead, speeds up convergence, confines network instability to an area, and improves performance. | ||
+ | |||
+ | #RIP is limited to 15 hops | ||
+ | #converges slowly | ||
+ | #chooses slow routes because it ignores critical factors such as bandwidth in route determination. | ||
+ | #Draw back of OSPF is that it only supports TCP/IP | ||
<table border 2> | <table border 2> | ||
- | <caption>Link State and Distance Vector Routing Protocols</caption> | + | <caption>'''Link State and Distance Vector Routing Protocols'''</caption> |
<tr> | <tr> | ||
<th> Protocol </th> <th> Examples </th><th> Characteristics </th> | <th> Protocol </th> <th> Examples </th><th> Characteristics </th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
- | <td> Distance Vector</td> <td>RIP v1 & Rip V2 | + | <td> Distance Vector</td> <td with=25%>RIP v1 & Rip V2 |
- | + | ||
</td> | </td> | ||
+ | <td width=65%> | ||
*Copies Routing table to neightbors | *Copies Routing table to neightbors | ||
*Updates frequentlu | *Updates frequentlu | ||
*RIP v1 & v2 use hop count as metric | *RIP v1 & v2 use hop count as metric | ||
- | *View the network from the perspective | + | *View the network from the perspective of the neighbors |
- | of the neighbors | + | |
*Slow to converge | *Slow to converge | ||
*Susceptible to routing loops | *Susceptible to routing loops | ||
Line 22: | Line 27: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
- | <td> Link-State </td> <td>OSPF | + | <td> Link-State </td><td with=25% >OSPF IS-IS</td> |
+ | <td> | ||
+ | *Uses shortest path | ||
+ | *Updates are event triggered | ||
+ | *Sends Link-state packets to all network routers | ||
+ | *Has common view of network | ||
+ | *Fast to converge | ||
+ | *Not as susceptible to routing loops | ||
+ | *Harder to configure | ||
+ | *Requires more memory and processing power than distance vector. | ||
+ | *Consummes less bandwith than distance vector. | ||
+ | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
+ | |||
+ | =Link State Routing Concepts= | ||
+ | ===Link State Routing Protocols Features=== | ||
+ | |||
+ | Link state protocols collect routing data from all other routers in the network or '''within a defined''' area of the network. Once the information is collected each router calculates the best paths to all destinations in the network. | ||
+ | Each router has it own map of the network so it is less likelly to propagate incorrect information. | ||
+ | |||
+ | The following are some link-state routing protocol functions: | ||
+ | |||
+ | #Respond quickly to network changes | ||
+ | #Send triggered updates only when a network change has occurred | ||
+ | #Send periodic updates known as link-state refreshes (a.k.a Hello packets) | ||
+ | #Use a hello mechanism to determine the reachability of neighbors. | ||
+ | |||
+ | Each router multicast an hello packets to keep tracks of the state of the nighbor routers. Each router LSAs tracks all the routers in its area on the network. The hello packets contain information about the networks that are | ||
+ | attached to the router. Routers that use link-state routing protocols have the following features: | ||
+ | *Use the hello information and LSAs received from other routers to build a database about the network. | ||
+ | *Use the SPF algorithm to calculate the shortest route to each network. | ||
+ | *Store the route information in the routing table. | ||
+ | |||
+ | ===How routing information is maintained === | ||
+ | The routing information is maintained the same way for any Link State Routing protocol: | ||
+ | *LSAs | ||
+ | *Topological Database | ||
+ | *SFP Alogarithm | ||
+ | *SPF Tree | ||
+ | *Routing table of paths and ports to determine the best path for packets for each network. | ||
+ | |||
+ | ===Link states routing alogarithms=== | ||
+ | Link-state routing algorithms maintain a complex database of the network topology by exchanging link-state advertisements (LSAs) with other routers in a network. Link-state routing algorithms have the following characteristics: | ||
+ | |||
+ | *They are known collectively as SPF protocols. | ||
+ | *They maintain a complex database of the network topology. | ||
+ | *They are based on the Dijkstra algorithm. | ||
+ | *Link-state protocols develop and maintain full knowledge of the network routers and how they interconnect. This is achieved through the exchange of LSAs with other routers in the network. | ||
+ | |||
+ | Each router constructs a topological database from the LSAs that it receives. The SPF algorithm is then used to compute the reachability of destinations. This information is used to update the routing table. This process can discover changes in the network topology caused by component failure or network growth. An LSA exchange is triggered by an event in the network instead of periodic updates. This speeds up the convergence process because there is no need to wait for a series of timers to expire before the routers can converge. | ||
+ | |||
+ | <table border=2> | ||
+ | <caption align="bottom" style="caption-side: top"> <b>Advantages & Disadvatages of Link State routing</b> </caption> | ||
+ | <tr> | ||
+ | <th> Advantages </th> <th> Disadvantages </th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td> | ||
+ | *Fast Convergence times, as changes are reported immediatelly by the source affected | ||
+ | *It provides robustness againts routing loops | ||
+ | *Routers known the topology | ||
+ | *Link-state packets are sequenced and aged | ||
+ | *The link-state database sizes can be minimized with carefull network design. | ||
+ | </td> | ||
+ | <td> | ||
+ | *Significant demands on memory and processing resources | ||
+ | *Requires very strict network design | ||
+ | *Requires a knowledgeable network administrator | ||
+ | *Initial flooding can impede network performance. | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | =OSPF Concepts= | ||
+ | An OSPF router gathers information about the '''link-status''' of each neighbor router (using OSPF) | ||
+ | The '''link-status''' is flooded to all its neighbors; the router adverstises its own link-state and passes on received '''link-states'''. | ||
+ | |||
+ | The router process the information about the '''link-states''' and build a link state database. | ||
+ | Every router in the OSPF area will have the same link-state database; therefore, every router has the same information about the state of the links and the neighbors of every other router. | ||
+ | |||
+ | Each router then applies the SPF algorithm on its own copy of the database. This calculation determines the best route to a destination. The SPF algorithm adds up the cost, which is a value that is usually based on bandwidth. | ||
+ | The lowest cost path is added to the routing table, which is also known as the forwarding database. | ||
+ | |||
+ | Each router keeps a list, of adjacent neighbors, called the '''adjacency database'''. The adjacency database is a list of all the neighbor routers to which a router has established bidirectional communication; the adjacency database is unique to each router | ||
+ | |||
+ | ===OSPF Rules=== | ||
+ | Link-State Advertissements (LSAs) | ||
+ | *Hello Interval | ||
+ | *Dead Interval | ||
+ | The LSAs are sent out only after a dead interval has been received. | ||
+ | |||
+ | Link-State Update | ||
+ | *Updates are sent to the DR & BDR and contains the LSA | ||
+ | *The DR will sent back an LSAck to the orignator & LSUs to the other routers. | ||
+ | *The other routers will send back an LSAck as well as the LSU if necessary to other | ||
+ | routers they may be connected to. | ||
+ | |||
+ | ==OSPF Definitions== | ||
+ | ;Link:Interface on a router | ||
+ | ;Link-State: The status of a link between two routers. Also a router interface and its relationship to neighbor routers. | ||
+ | ;Link-State Database (topological database): A list of information about all other routers in an internetwork. | ||
+ | ;Area: A collection of networks and routers that has the same area identifification. Each router within an area has the same link-state information. A router within an area is called '''Internal Router'''. | ||
+ | ;Cost: The value assiged to a link. Link state protocols assign a cost to a link based on the bandwidth of the link or transmission speed. This is used instead of hops. | ||
+ | ;Routing Table: This is also called fowarding database. A routing table is generated when an algorith is run on a link-state database. The routing table for each router is unique. | ||
+ | ;Adjancency database: A list of all the neighbor routers to which a router has established biderectional communication. This is unique to each router. | ||
+ | ; Designated Router (DR) & Backup Designated Router (BDR): A router that is elected by all other routers on the same LAN to represent all the routers. Each network has a DR and BDR. | ||
+ | |||
+ | ;How DR & BDR are elected: | ||
+ | *The DR on a network is elected according to its priority. | ||
+ | *The higher the priority number the better the chances of been DR. | ||
+ | *Priority values vary between 0 and 255 | ||
+ | *With an equal priority on a broadcast network, the router with the highest Router ID wins. | ||
+ | *For the purpose of electing DR/BDR the router needs an active Router ID. | ||
+ | |||
+ | ;OSPF Configuration: | ||
+ | *An area must be specified. If only 1 area exist Area is 0 ELSE area could be between 0 - 65535 | ||
+ | *A process ID must be defined (1 and 65535) | ||
+ | *A wilcard mask is recommended to indentify the participating IP address. | ||
+ | *Needs to have and active RouterID | ||
+ | *OSPF chooses the highest local active IP address to be the Router ID. | ||
+ | *IF the interface choosen to be the Router ID becomes inactive ('''down''') the OSPF process will stop | ||
+ | *An loopback interface (virtual) needs to be configued to avoid the OSPF process to Stop. | ||
+ | |||
+ | =Configuring Basic OSPF= | ||
+ | |||
+ | ;Enabling OSPF Process: | ||
+ | |||
+ | Router (config)router ospf PROCESS_ID | ||
+ | Router (config)router ospf 1 | ||
+ | |||
+ | ;Avertissing Networks: | ||
+ | |||
+ | Router(config-router)#network address WILDCARD-MASK area AREA-ID | ||
+ | Router (config-router)#network 172.16.32.0 0.0.31.255 area 0 | ||
+ | |||
+ | ;Description: | ||
+ | Display parameters for timers, filters metrics networks and other | ||
+ | information for the entire router. | ||
+ | |||
+ | show ip protocol | ||
+ | |||
+ | ;Description: | ||
+ | Display the routes known to the router and describe | ||
+ | how they were learned. This is one of the best ways to determine | ||
+ | connectivity between the local router and the rest of the internetwork | ||
+ | |||
+ | show ip route | ||
+ | |||
+ | ;Description: | ||
+ | Verifies that interfaces have been configured in the intended areas. | ||
+ | If no loopback adddress is specified the interface with the higher address | ||
+ | is taken as the router ID. It also gives the timer intervals such as the hello | ||
+ | interval and shows the router adjencies | ||
+ | |||
+ | show ip ospf intertace | ||
+ | |||
+ | ;Description: | ||
+ | Display the number of times the SPF alogarithm has been | ||
+ | used. It also shows the link-state update interval if no topological | ||
+ | changes have ocurred. | ||
+ | |||
+ | show ip ospf | ||
+ | |||
+ | ;Description: | ||
+ | This displays a detailed list of neighbors, their | ||
+ | priorities, and their state such as init exstart, or full | ||
+ | |||
+ | show ip ospf neighbor detail | ||
+ | |||
+ | ;Description: | ||
+ | Display the contents of the topological database maintained by the router. | ||
+ | It Also shows the router ID and the OSPF process ID. | ||
+ | A number of database types can be shown when this command is used | ||
+ | with keywords. | ||
+ | |||
+ | show ip ospf database | ||
+ | |||
+ | =External Link= | ||
+ | Fo r more details on read this article on [http://en.wikipedia.org/wiki/OSPF Open Shortest Path First] |
Current revision as of 19:11, 26 October 2006
OSPF is a link state routing protocol that is based on a open standard, meaning open to the public and is non proprietary. OSPF is the preffered IGP if comparaed to RIP (v1&v2); it the prefered IGP because it is scalable. OSPF gives majors advantages to the administrator and it gives them extensive control of the routing updates, Area definition reduces routing overhead, speeds up convergence, confines network instability to an area, and improves performance.
- RIP is limited to 15 hops
- converges slowly
- chooses slow routes because it ignores critical factors such as bandwidth in route determination.
- Draw back of OSPF is that it only supports TCP/IP
Protocol | Examples | Characteristics |
---|---|---|
Distance Vector | RIP v1 & Rip V2 |
|
Link-State | OSPF IS-IS |
|
Contents |
[edit] Link State Routing Concepts
[edit] Link State Routing Protocols Features
Link state protocols collect routing data from all other routers in the network or within a defined area of the network. Once the information is collected each router calculates the best paths to all destinations in the network. Each router has it own map of the network so it is less likelly to propagate incorrect information.
The following are some link-state routing protocol functions:
- Respond quickly to network changes
- Send triggered updates only when a network change has occurred
- Send periodic updates known as link-state refreshes (a.k.a Hello packets)
- Use a hello mechanism to determine the reachability of neighbors.
Each router multicast an hello packets to keep tracks of the state of the nighbor routers. Each router LSAs tracks all the routers in its area on the network. The hello packets contain information about the networks that are attached to the router. Routers that use link-state routing protocols have the following features:
- Use the hello information and LSAs received from other routers to build a database about the network.
- Use the SPF algorithm to calculate the shortest route to each network.
- Store the route information in the routing table.
[edit] How routing information is maintained
The routing information is maintained the same way for any Link State Routing protocol:
- LSAs
- Topological Database
- SFP Alogarithm
- SPF Tree
- Routing table of paths and ports to determine the best path for packets for each network.
[edit] Link states routing alogarithms
Link-state routing algorithms maintain a complex database of the network topology by exchanging link-state advertisements (LSAs) with other routers in a network. Link-state routing algorithms have the following characteristics:
- They are known collectively as SPF protocols.
- They maintain a complex database of the network topology.
- They are based on the Dijkstra algorithm.
- Link-state protocols develop and maintain full knowledge of the network routers and how they interconnect. This is achieved through the exchange of LSAs with other routers in the network.
Each router constructs a topological database from the LSAs that it receives. The SPF algorithm is then used to compute the reachability of destinations. This information is used to update the routing table. This process can discover changes in the network topology caused by component failure or network growth. An LSA exchange is triggered by an event in the network instead of periodic updates. This speeds up the convergence process because there is no need to wait for a series of timers to expire before the routers can converge.
Advantages | Disadvantages |
---|---|
|
|
[edit] OSPF Concepts
An OSPF router gathers information about the link-status of each neighbor router (using OSPF) The link-status is flooded to all its neighbors; the router adverstises its own link-state and passes on received link-states.
The router process the information about the link-states and build a link state database. Every router in the OSPF area will have the same link-state database; therefore, every router has the same information about the state of the links and the neighbors of every other router.
Each router then applies the SPF algorithm on its own copy of the database. This calculation determines the best route to a destination. The SPF algorithm adds up the cost, which is a value that is usually based on bandwidth. The lowest cost path is added to the routing table, which is also known as the forwarding database.
Each router keeps a list, of adjacent neighbors, called the adjacency database. The adjacency database is a list of all the neighbor routers to which a router has established bidirectional communication; the adjacency database is unique to each router
[edit] OSPF Rules
Link-State Advertissements (LSAs)
- Hello Interval
- Dead Interval
The LSAs are sent out only after a dead interval has been received.
Link-State Update
- Updates are sent to the DR & BDR and contains the LSA
- The DR will sent back an LSAck to the orignator & LSUs to the other routers.
- The other routers will send back an LSAck as well as the LSU if necessary to other
routers they may be connected to.
[edit] OSPF Definitions
- Link
- Interface on a router
- Link-State
- The status of a link between two routers. Also a router interface and its relationship to neighbor routers.
- Link-State Database (topological database)
- A list of information about all other routers in an internetwork.
- Area
- A collection of networks and routers that has the same area identifification. Each router within an area has the same link-state information. A router within an area is called Internal Router.
- Cost
- The value assiged to a link. Link state protocols assign a cost to a link based on the bandwidth of the link or transmission speed. This is used instead of hops.
- Routing Table
- This is also called fowarding database. A routing table is generated when an algorith is run on a link-state database. The routing table for each router is unique.
- Adjancency database
- A list of all the neighbor routers to which a router has established biderectional communication. This is unique to each router.
- Designated Router (DR) & Backup Designated Router (BDR)
- A router that is elected by all other routers on the same LAN to represent all the routers. Each network has a DR and BDR.
- How DR & BDR are elected
- The DR on a network is elected according to its priority.
- The higher the priority number the better the chances of been DR.
- Priority values vary between 0 and 255
- With an equal priority on a broadcast network, the router with the highest Router ID wins.
- For the purpose of electing DR/BDR the router needs an active Router ID.
- OSPF Configuration
- An area must be specified. If only 1 area exist Area is 0 ELSE area could be between 0 - 65535
- A process ID must be defined (1 and 65535)
- A wilcard mask is recommended to indentify the participating IP address.
- Needs to have and active RouterID
- OSPF chooses the highest local active IP address to be the Router ID.
- IF the interface choosen to be the Router ID becomes inactive (down) the OSPF process will stop
- An loopback interface (virtual) needs to be configued to avoid the OSPF process to Stop.
[edit] Configuring Basic OSPF
- Enabling OSPF Process
Router (config)router ospf PROCESS_ID Router (config)router ospf 1
- Avertissing Networks
Router(config-router)#network address WILDCARD-MASK area AREA-ID Router (config-router)#network 172.16.32.0 0.0.31.255 area 0
- Description
Display parameters for timers, filters metrics networks and other information for the entire router.
show ip protocol
- Description
Display the routes known to the router and describe how they were learned. This is one of the best ways to determine connectivity between the local router and the rest of the internetwork
show ip route
- Description
Verifies that interfaces have been configured in the intended areas. If no loopback adddress is specified the interface with the higher address is taken as the router ID. It also gives the timer intervals such as the hello interval and shows the router adjencies
show ip ospf intertace
- Description
Display the number of times the SPF alogarithm has been used. It also shows the link-state update interval if no topological changes have ocurred.
show ip ospf
- Description
This displays a detailed list of neighbors, their priorities, and their state such as init exstart, or full
show ip ospf neighbor detail
- Description
Display the contents of the topological database maintained by the router. It Also shows the router ID and the OSPF process ID. A number of database types can be shown when this command is used with keywords.
show ip ospf database
[edit] External Link
Fo r more details on read this article on Open Shortest Path First