1 / 91

OSPF

OSPF. W.lilakiatsakun. Introduction. OSPF OSPF was designed by the IETF (Internet Engineering Task Force) OSPF Working Group, which still exists today. The development of OSPF began in 1987 and there are two current versions in use: OSPFv2: OSPF for IPv4 networks (RFC 1247 and RFC 2328)

Download Presentation

OSPF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OSPF W.lilakiatsakun

  2. Introduction • OSPF • OSPF was designed by the IETF (Internet Engineering Task Force) OSPF Working Group, which still exists today. • The development of OSPF began in 1987 and there are two current versions in use: • OSPFv2: OSPF for IPv4 networks (RFC 1247 and RFC 2328) • OSPFv3: OSPF for IPv6 networks (RFC 2740) • Most of the work on OSPF was done by John Moy, author of most of the RFCs regarding OSPF.

  3. OSPF Message encapsulation (1)

  4. OSPF Message encapsulation (2) • The OSPF packet header is included with every OSPF packet, regardless of its type. • The OSPF packet header and packet type-specific data are then encapsulated in an • IP packet. • In the IP packet header, the protocol field is set to 89 to indicate OSPF, • and the destination address is set to one of two multicast addresses: 224.0.0.5 or • 224.0.0.6. • If the OSPF packet is encapsulated in an Ethernet frame, the destination • MAC address is also a multicast address: 01-00-5E-00-00-05 or 01-00-5E-00-00-06.

  5. OSPF Message encapsulation (3)

  6. OSPF Packet Types (1) • 1. Hello - Hello packets are used to establish and maintain adjacency with other OSPF routers. • 2. DBD - The Database Description (DBD) packet contains an abbreviated list of the sending router's link-state database and is used by receiving routers to check against the local link-state database. • 3. LSR - Receiving routers can then request more information about any entry in the DBD by sending a Link-State Request (LSR). • 4.LSU - Link-State Update (LSU) packets are used to reply to LSRs as well as to announce new information. • LSUs contain seven different types of Link-State Advertisements (LSAs). LSUs and LSAs are briefly discussed in a later topic. • 5. LSAck - When an LSU is received, the router sends a Link-State Acknowledgement (LSAck) to confirm receipt of the LSU.

  7. OSPF Packet Types (1)

  8. Hello protocol (1) • OSPF packet Type 1 is the OSPF Hello packet. Hello packets are used to: • Discover OSPF neighbors and establish neighbor adjacencies. • Advertise parameters on which two routers must agree to become neighbors. • Elect the Designated Router (DR) and Backup Designated Router (BDR) on multi-access networks like Ethernet and Frame Relay.

  9. Hello protocol (2)

  10. Hello protocol (3) • Type: OSPF Packet Type: Hello (1), DD (2), LS Request (3), LS Update (4), LS ACK (5) • Router ID: ID of the originating router • Area ID: area from which the packet originated • Network Mask: Subnet mask associated with the sending interface • Hello Interval: number of seconds between the sending router's hellos • Router Priority: Used in DR/BDR election (discussed later) • Designated Router (DR): Router ID of the DR, if any • Backup Designated Router (BDR): Router ID of the BDR, if any • List of Neighbors: lists the OSPF Router ID of the neighboring router(s)

  11. Hello protocol (4)- Neighbor Establishment • Before an OSPF router can flood its link-states to other routers, it must first determine if there are any other OSPF neighbors on any of its links. • In the figure, the OSPF routers are sending Hello packets on all OSPF-enabled interfaces to determine if there are any neighbors on those links. • The information in the OSPF Hello includes the OSPF Router ID of the router sending the Hello packet Receiving an OSPF Hello packet on an interface confirms for a router that there is another OSPF router on this link. • OSPF then establishes adjacency with the neighbor. • For example, in the figure, R1will establish adjacencies with R2 and R3.

  12. Hello protocol (5/1) - OSPF Hello and Dead Intervals • Before two routers can form an OSPF neighbor adjacency, they must agree on three values: Hello interval, Dead interval, and network type. • The OSPF Hello interval indicates how often an OSPF router transmits its Hello packets. • By default, OSPF Hello packets are sent every 10 seconds on multiaccess and point-to-point segments and every 30 seconds on non-broadcast multiaccess (NBMA) segments (Frame Relay, X.25, ATM). • In most cases, OSPF Hello packets are sent as multicast to an address reserved for ALLSPFRouters at 224.0.0.5.

  13. Hello protocol (5/2) - OSPF Hello and Dead Intervals • The Dead interval is the period, expressed in seconds, that the router will wait to receive a Hello packet before declaring the neighbor "down.“ • Cisco uses a default of four times the Hello interval. • For multiaccess and point-to-point segments, this period is 40 seconds. For NBMA networks, the Dead interval is 120 seconds. • If the Dead interval expires before the routers receive a Hello packet, OSPF will remove that neighbor from its link-state database. • The router floods the link-state information about the "down" neighbor out all OSPF enabled interfaces.

  14. Hello protocol (6)- Electing a DR and BDR • To reduce the amount of OSPF traffic on multiaccess networks, OSPF elects a Designated Router (DR) and Backup Designated Router (BDR). • The DR is responsible for updating all other OSPF routers (called DROthers) when a change occurs in the multiaccess network. • The BDR monitors the DR and takes over as DR if the current DR fails. • In the figure, R1, R2, and R3 are connected through point-to-point links. Therefore, no DR/BDR election occurs.

  15. OSPF Link State Updates • Link-state updates (LSUs) are the packets used for OSPF routing updates. • An LSU packet can contain ten different types of Link-State Advertisements (LSAs), as shown in the figure. • The difference between the terms Link-State Update (LSU) and Link-State Advertisement (LSA) can sometimes be confusing. • At times, these terms are used interchangeably. • An LSU contains one or more LSAs and either term can be used to refer to link-state information propagated by OSPF routers.

  16. OSPF Algorithm

  17. Administrative Distance (AD)

  18. Authentication • It is good practice to authenticate transmitted routing information. • RIPv2, EIGRP, OSPF, IS-IS, and BGP can all be configured to encrypt and authenticate • their routing information. • This practice ensures that routers will only accept routing information from other routers • that have been configured with the same password or authentication information.

  19. The OSPF Metric (1) • The OSPF metric is called cost. • From RFC 2328: "A cost is associated with the output side of each router interface. This cost is configurable by the system administrator. The lower the cost, the more likely the interface is to be used to forward data traffic." • Notice that RFC 2328 does not specify which values should be used to determine the cost.

  20. The OSPF Metric (2) • The Cisco IOS uses the cumulative bandwidths of the outgoing interfaces from the router to the destination network as the cost value. • At each router, the cost for an interface is calculated as 10 to the 8th power divided by bandwidth in bps. This is known as the reference bandwidth. • Dividing 10 to the 8th power by the interface bandwidth is done so that interfaces with the higher bandwidth values will have a lower calculated cost. • Remember, in routing metrics, the lowest cost route is the preferred route (for example, with RIP, 3 hops is better than 10 hops).

  21. The OSPF Metric (3) Reference Bandwidth The reference bandwidth defaults to 10 to the 8th power, 100,000,000 bps or 100 Mbps. This results in interfaces with a bandwidth of 100 Mbps and higher having the same OSPF cost of 1. The reference bandwidth can be modified to accommodate networks with links faster than 100,000,000 bps (100 Mbps) using the OSPF command auto-cost reference- bandwidth. When this command is necessary, it is recommended that it is used on all routers so the OSPF routing metric remains consistent.

  22. The OSPF Metric (4) OSPF Accumulates Costs The routing table on R1 shows a cost of 65 to reach the 10.10.10.0/24 network on R2. Because 10.10.10.0/24 is attached to a FastEthernet interface, R2 assigns the value 1 as the cost for 10.10.10.0/24. R1 then adds the additional cost value of 64 to send data across the default T1 link between R1 and R2.

  23. The OSPF Metric (5)

  24. The OSPF Metric (6)

  25. The OSPF Metric (7)

  26. The OSPF Metric (8) • Modifying the cost • The bandwidth command is used to modify the bandwidth value used by the IOS in calculating the OSPF cost metric. • Router(config-if)#bandwidth bandwidth-kbps • The ip ospf cost command, which allows you to directly specify the cost of an interface. For example, on R1 we could configure Serial 0/0/0 with the following command: • R1(config)#interface serial 0/0/0 • R1(config-if)#ip ospf cost 1562

  27. The OSPF Metric (8)

  28. The OSPF Metric (9)

  29. OSPF and Multiaccess Networks • A multiaccess network is a network with more than two devices on the same shared media. • Ethernet LANs are an example of a broadcast multiaccess network. • They are broadcast networks because all devices on the network see all frames. • They are multiaccess networks because there may be numerous hosts, printers, routers, and other devices that are all members of the same network. • A point-to-point network , there are only two devices on the network, one at each end.

  30. Multiaccess and Point-to-Point Network

  31. OSPF network types (1) • Point-to-point • Broadcast Multiaccess • Nonbroadcast Multiaccess (NBMA) • Point-to-multipoint • Virtual links • NBMA and point-to-multi-point networks include Frame Relay, ATM, and X.25 networks. • Virtual links are a special type of link that can be used in multi-area OSPF.

  32. OSPF network types (2)

  33. OSPF network types (3)

  34. Challenges in Multiaccess network (1) • Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs: • 1. Creation of multiple adjacencies, one adjacency for every pair of routers. • 2. Extensive flooding of LSAs (Link-State Advertisements).

  35. Challenges in Multiaccess network (2) • Multiple Adjacencies • The creation of an adjacency between every pair of routers in a network would create an unnecessary number of adjacencies. • This would lead to an excessive number of LSAs passing between routers on the same network.

  36. Challenges in Multiaccess network (3)

  37. Challenges in Multiaccess network (4) • Flooding of LSAs • Since "Link-State Routing Protocols," the link-state routers have to flood their link-state packets when OSPF is initialized or when there is a change in the topology. • In a multiaccess network this flooding can become excessive.

  38. Challenges in Multiaccess network (5)

  39. Challenges in Multiaccess network (6) • Solution: Designated Router • The solution to managing the number of adjacencies and the flooding of LSAs on a multiaccess network is the Designated Router (DR). • This solution is analogous to electing someone in the room to go around and learn everyone's names and then announce these names to everyone in the room at once.

  40. Designated Router (1) • On multiaccess networks, OSPF elects a Designated Router (DR) to be the collection and distribution point for LSAs sent and received. • A Backup Designated Router (BDR) is also elected in case the Designated Router fails. • All other routers become DROthers (this indicates a router that is neither the DR or the BDR).

  41. Designated Router (2) • Routers on a multiaccess network elect a DR and BDR. • DROthers only form full adjacencies with the DR and BDR in the network. • This means that instead of flooding LSAs to all routers in the network, DROthers only send their LSAs to the DR and BDR using the multicast address 224.0.0.6 (ALLDRouters - All DR routers). In the figure, R1 sends LSAs to the DR. The BDR listens as well

  42. Designated Router (3) The DR is responsible for forwarding the LSAs from R1 to all other routers. The DR uses the multicast address 224.0.0.5 (AllSPFRouters - All OSPF routers). The end result is that there is only one router doing all of the flooding of all LSAs in the multiaccess network.

  43. DR and BDR election (1) The following criteria are applied: 1. DR: Router with the highest OSPF interface priority. 2. BDR: Router with the second highest OSPF interface priority. 3. If OSPF interface priorities are equal, the highest router ID is used to break the tie.

  44. DR and BDR election (2)

  45. DR and BDR election (3)

  46. DR and BDR election (4)

  47. DR and BDR election (5) • It is important to know that when the DR is elected, it remains the DR until one of the following conditions occurs: • The DR fails. • The OSPF process on the DR fails. • The multiaccess interface on the DR fails.

  48. DR and BDR election (6)

More Related