1 / 164

Configuring OSPF

Configuring OSPF. Andrei Bot. May 9 th , 2012. References: 1. CCIE Professional Development Routing TCP/IP, Volume I, Second Edition by Jeff Doyle -  CCIE No. 1919, Jennifer Carroll -  CCIE No. 1402 2. CCIE Routing & Switching Lab Workbook for CCIEv4.0, volume I

jesse
Télécharger la présentation

Configuring 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. Configuring OSPF Andrei Bot May 9th , 2012

  2. References: 1. CCIE Professional Development Routing TCP/IP, Volume I, Second Edition by Jeff Doyle -  CCIE No. 1919, Jennifer Carroll -  CCIE No. 1402 2. CCIE Routing & Switching Lab Workbook for CCIEv4.0, volume I by internetworkexpert.com 3. Troubleshooting IP Routing Protocols, by Zaheer Aziz(CCIE#4127), Johnson Liu(CCIE#2637) 4. OSPF, Anatomy of an Internet Routing Protocol by Addison Wesley 5. OSPF Design Guide http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml 6. RFC 2328, OSPF Version 2 http://www.rfc-editor.org/rfc/rfc2328.txt

  3. Introduction to OSPF, link-state protocols • OSPF Packets types/formats • OSPF Multi Area Design • Link-State Database, LSA Types • OSPF Basic Configuration • OSPF over NBMA networks • OSPF Special area types • OSPF Filtering

  4. Introducing the OSPF Protocol

  5. Introduction OSPF(The Open Shortest Path First) defined in RFC 2328, is an Interior Gateway Protocol used to distribute routing information within a single Autonomous System. OSPF protocol was developed due to a need in the internet community to introduce a high functionality non-proprietary IGP for the TCP/IP protocol family. The OSPF protocol is based on link-state technology and has introduced new concepts such as authentication of routing updates, Variable Length Subnet Mask(VLSM), route summarization and so forth.

  6. OSPF vs RIP The rapid growth and expansion of today’s networks has pushed RIP to its limits. RIP has certain limitations that can cause problems in large scale networks * 15 hops limit(over is considered unreachable) * no VLSM * periodic broadcast of the full routing table * slower convergence * routing decisions are based solely on hop counts * flat networks, no hierarchical structure(no areas and no boundaries) ->Some enhancements were introduced in a new version of RIP called RIP2(VLSM, authentication and multicast routing)

  7. OSPF, on the other hand, addresses most of the issues previously presented * no hop count limitation * VLSM * multicast routing * triggered updates * better convergence time * routing authentication * hierarchical network structure(areas) What do we mean by Link-States? We can think of a link as being an interface on the router. The state of the link is a description of that interface which would include for example, the IP address of the interface, subnet mask, type of network is connected to, the routers connected to that network and so on. The collection of all this link-states would form a LSDB. Shortest Path First Algorithm OSPF use SPF(Dijkstra) algorithm in order to build and calculate the shortest path to all destinations. The algorithm by itself is quite complicated. This is a very simplified way of looking at the various steps of the algorithm:

  8. 1. Upon initialization or due to any change in routing information, a router generates a link-state advertisement, which represents a collection of all link-states on that router 2. All routers exchange link-states by means of flooding. Each router that receives a link-state update should store a copy in its LSDB and then propagate the update to other routers. 3. After the database of each router is completed, the router calculate a Shortest Path Tree to all destinations. The destinations, the associated cost and the next-hop to reach those destinations form the IP routing table 4. In case of no change in the network(cost, link deleted or added) OSPF should be very quiet. Any change that occur is communicated through link-state packets and SPF algorithm is recalculated in order to find the new shortest path. The algorithm places each router at the root of a tree and calculate the shortest path to each destination based on cumulative cost required to reach that destination. Each router will have its own view of the topology even though all the routers will build a shortest path tree using the same LSDB. OSPF Cost Also called metric of an interface in OSPF, is an indication of the overhead required to send packets across. The cost is inversely proportional to the bandwidth of that interface. A higher bandwidth indicates a lower cost (10Mbps-10cost, T1-64cost, etc) COST = 10^8/bandwidth(bps)

  9. Shortest Path Tree Once the tree is built, the routing table is populated with the best path for all destinations according to the cost calculated in the tree.

  10. OSPF Packet Types

  11. OSPF Packet Formats

  12. Neighbors and Adjacencies • Before any LSAs can be sent, OSPF routers must discover their neighbors and establish adjacencies. The neighbors will be recorded in a “Neighbor table”. • Each router have a Router-ID which is an IP address by which the router is uniquely identified within the OSPF domain. • Hello Protocol • The hello protocol serves several purposes: • discovery • keepalives • ensure a bidirectional communication between neighbors • exchange required parameters in order to form a neighbor/adjacency relation • ensure DR/BDR election on broadcast and NBMA networks • When a router receives a hello from a neighbor, it will verify that the Area ID, Authentication, Network Mask, Hello Interval, Dead Interval and Options values match the values configured on the receiving interface. If they do not, the packet is dropped and no adjacency is established.

  13. Network Types Point-to-Point: Valid neighbors on P2P networks will always become adjacent. The destination address of OSPF packets will always be 224.0.0.5(all OSPF routers) Broadcast Networks: They are also called broadcast multi access. OSPF routers on broadcast networks will elect a DR and a BDR. Hello packets are multicast 224.0.0.5 as are all OSPF packets originated by DR and BDR. 224.0.0.6 will be used to communicate with DR and BDR by all OSPF routers in the broadcast domain. Non-broadcast networks: capable of connecting more than two routers but with no broadcast capabilities. DR/BDR elected and all OSPF packets are unicast. Point-to-Multipoint: a special configuration of NBMA where networks are treated as a collection of P2P links. No DR/BDR and OSPF packets are unicast to each known neighbor. Virtual Links All this five network types fall into one of two more general types a. Transit networks b. Stub networks

  14. Designated and Backup Designated Routers(DR/BDR) • Multi-access networks present two problems for OSPF relating to the flooding of LSAs • adjacency between every attached router • excessive and chaotic LSA flooding •  To prevent this problems a DR/BDR is elected on a multi-access network.

  15. The election is done via Hello protocol. The router with the highest OSPF priority(default priority value is 1) on a segment will become the DR for that segment(the same process is repeated for the BDR). In case of a tie, the router with the highest RID will win. A priority of 0(zero) indicates an interface which is not eligible to be elected as DR or BDR. The state of the interface with a zero priority will be DROTHER. The priority and the Router ID can influence the election, but will not override an active DR or BDR. That is, if a router with a higher priority becomes active after a DR/BDR have been elected, the new router will not replace either of them and it will become a DROTHER. Adjacency is the next step after the neighboring process. Adjacent routers go beyond the simple Hello exchange and proceed into the database exchange process via DB Descriptors. Once a DR(BDR) is elected, every router exchange information’s with the DR(BDR) only, and the DR will relay this information to all other routers in the segment.

  16. OSPF Neighbors • The ultimate purpose of the neighbor relationship is the formation of adjacencies over which to pass routing information. • An adjacency is established in four general phases: • Neighbor discovery • Bidirectional communication • Database synchronization • Full adjacency

  17. Building an Adjacency Neighbors on P2P, P2M and virtual-links networks always become adjacent unless the parameters of their Hellos don’t match. On the broadcast and NBMA networks, the DR and BDR become adjacent with al neighbors, but no adjacencies exist between DROTHERS. The adjacency building process uses three OSPF packet types: a. Database Description packets b. Link State Request packets c. Link State Update packets There are three flags used in DBD packets to manage the adjacency building process: a. The I bit - Initial bit b. The M bit - More bit c. The MS bit - Master/Slave (MS=1 is the master)

  18. RT1 becomes active on the multi-access network and sends Hello packet. It has not yet heard from any neighbors, so the Neighbor field of the packet is empty, and the DR and BDR fields are set to 0.0.0.0 Upon reception of the Hello from RT1, RT2 creates a neighbor data structure for RT1 and sets to INIT. RT2 sends a Hello packet with RT1’s Router ID in the Neighbor field and the DR, RT2 also includes its own interface address in the DR field. Seeing its Router ID in the received Hello packet RT1 enters into 2WAY and creates a neighbor data structure for RT2 and than sets RT2’s state to EXSTART for the Master/Slave negotiation. It then generates an empty (no LSA summaries) Database Description packet. The DD seq. number is set to x, the I-bit is set to indicate that this is the RT1’s initial DD packet for this exchange, the M-bit is set to indicate that this is not the last DD packet, and the MS-bit is set to indicate that RT1 is asserting itself as the master RT2 transitions RT1’s stat to EXSTART upon reception of the DD packet. It then sends a responding DD packet with a DD seq. number of y. RT2 has a higher router ID that RT1, so it sets the MS-bit. Like the first DD packet, this one is used for the master/slave negotiation and therefore is empty. Agreeing that RT2 is the master, RT1 transitions RT2’s state to EXCHANGE. RT1 will generate a DD packet with RT2’s DD sequence number of y and MS=0, indicating that RT1 is the slave. This packet will be populated with LSA headers from RT1’s Link State Summary list. RT2 transitions its neighbor state to EXCHANGE upon receipt of RT1’s DD packet. It will send a DD packet containing LSA headers from its Link State Summary list and will increment the DD seq. number to y+1

  19. RT1 sends an acknowledging packet containing the same seq number as in the DD packet that it just received from RT2. The process continues, with RT2 sending a single DD packet and then waiting for an acknowledging packet from RT1 containing the same seq. number before sending the next packet. When RT2 sends the DD packet with the last of its LSA summaries, it sets M=0 Receiving this packet and knowing that the acknowledging packet it will send contains the last of its own LSA summaries, RT1 knows the Exchange process is done. However, it has entries in its Link State Request lists; therefore it will transition to LOADING When RT2 receives RT1’s last DD packet, RT2 transitions RT1’s state to full because it has no entries in its Link State Request list. RT1 sends Link State Request packets, and RT2 sends the requested LSAs in Link State Update packets, until RT1’s Link State Request list is empty. RT1 will then transition RT2’s state to FULL

  20. Flooding • OSPF builds a topological database better known as the Link-State database. The database consists of all the LSAs the router has received. • Flooding is the process by which these changed or new LSAs are sent throughout the network, to ensure that the database of every node is updated and remains identical to all other nodes’ databases. • Flooding makes use of the following two OSPF packet types: • Link State Update • Link State Acknowledgement

  21. OSPF Multi Area Design

  22. Areas • In the context of OSPF, an area is a logical grouping of OSPF routers and links that effectively divide an OSPF domain into sub-domains. Routers within an area will not have detailed knowledge of the topology outside of their area • A multi area design will result in: • a smaller link-state database(fewer LSAs to process and therefore less impact on the CPU) • a reduced impact on a router’s memory by running a reduced size of the database (a router will share an identical link state database only with the other routers in its area, not the entire OSPF domain) • reduced the range of a flooding domain (most LSA flooding are limited within an area)

  23. Areas are indentified by a 32-bit area ID which might be represented as a decimal number or in a dotted decimal. • area 0 = area 0.0.0.0 • area 33 = area 0.0.0.33 • area 320 = area 0.0.1.64 • = 00000000.00000000.00000001.01000000 • As a result of having a multiple area design we can have: • Intra-area traffic • Inter-area traffic • External traffic •  Area 0 is reserved for the backbone. All inter-area traffic must pass through the backbone. Non backbone areas cannot exchange packets directly.

  24. Router Types • Routers, like traffic can be categorized in relation to areas. • Internal Routers • Area Border Routers(ABR) • Backbone Routers • Autonomous System Boundary Routers(ASBR)

  25. Partitioned Areas  A partitioned area is an area in which a link/router failure causes one part of the area to become isolated from another.

  26. Virtual-Links • A virtual link is a link to the backbone through a non-backbone area. Virtual-links are used for the following purposes: • to link an area to the backbone through a non-backbone area • to connect the two parts of a partitioned backbone through a non-backbone area

  27. Several rules are associated with configuration of virtual-links: • virtual links must be configured between two ABRs • the transit area cannot be a stub area • Virtual links should be used as a temporary fix to an existing problem. Permanent virtual-links are virtually always a sign of a poorly designed network. • Path Types •  Each route to a network destination is also classified as one of four path types: • 1. (I) Intra-area paths = destinations within one of the router’s attached area • 2. (IA) Inter-area paths = destinations in another area but same OSPF domain. • 3. (E1) Type-1 external paths = destinations outside of OSPF domain • 4. (E2) Type-2 external paths = destinations outside of OSPF domain • E1 and E2 routes provides the option of choosing weather the internal cost to the ASBR is important or weather only the external cost of an external route, disregarding the internal cost of reaching the ASBR.

More Related