🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Day+27+Slides+-+OSPF+(Part+2).pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

CCNA 200-301 Day 27 OSPF Part 2 Things we’ll cover OSPF metric (cost) Becoming OSPF neighbors More OSPF Configuration OSPF Cost OSPF’s metric is called cost It is automatically calculated based on the band...

CCNA 200-301 Day 27 OSPF Part 2 Things we’ll cover OSPF metric (cost) Becoming OSPF neighbors More OSPF Configuration OSPF Cost OSPF’s metric is called cost It is automatically calculated based on the bandwidth (speed) of the interface. It is calculated by dividing a reference bandwidth value by the interface’s bandwidth. The default reference bandwidth is 100 mbps. Reference: 100 mbps / Interface: 10 mbps = cost of 10 Reference: 100 mbps / Interface: 100 mbps = cost of 1 Reference: 100 mbps / Interface: 1000 mbps = cost of 1?? Reference: 100 mbps / Interface: 10000 mbps = cost of 1?? All values less than 1 will be converted to 1. Therefore FastEthernet, Gigabit Ethernet, 10Gig Ethernet, etc. are equal and all have a cost of 1 by default. OSPF Cost OSPF Area 0 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 G1/0.1.1 G1/0 10.0.13.0/30 10.0.24.0/30 G0/0.2.2 G0/0.1 10.0.34.0/30.2 R3 R4 F2/0 F2/0.126 G1/0 G1/0.254 192.168.3.0/25 192.168.4.0/24 OSPF Cost OSPF Area 0 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 G1/0.1.1 G1/0 10.0.13.0/30 10.0.24.0/30 G0/0.2.2 G0/0.1 10.0.34.0/30.2 R3 R4 F2/0 F2/0.126 G1/0 G1/0.254 192.168.3.0/25 192.168.4.0/24 OSPF Cost OSPF’s metric is called cost It is automatically calculated based on the bandwidth (speed) of the interface. It is calculated by dividing a reference bandwidth value by the interface’s bandwidth. The default reference bandwidth is 100 mbps. Reference: 100 mbps / Interface: 10 mbps = cost of 10 Reference: 100 mbps / Interface: 100 mbps = cost of 1 Reference: 100 mbps / Interface: 1000 mbps = cost of 1?? Reference: 100 mbps / Interface: 10000 mbps = cost of 1?? All values less than 1 will be converted to 1. Therefore FastEthernet, Gigabit Ethernet, 10Gig Ethernet, etc. are equal and all have a cost of 1 by default. You can (and should!) change the reference bandwidth with this command: R1(config-router)# auto-cost reference-bandwidth megabits-per-second OSPF Cost OSPF Area 0 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 The command is entered in megabits per 10.0.12.0/30 second (default is 100) G1/0.1.1 G1/0 10.0.13.0/30 100000 / 100 = cost of 1000 for FastEthernet 10.0.24.0/30 100000 / 1000 = cost of 100 for Gig Ethernet G0/0.2.2 G0/0 You should configure a reference bandwidth.1 10.0.34.0/30.2 greater than the fastest links in your network R3 R4 (to allow for future upgrades) F2/0 F2/0.126 G1/0 G1/0.254 You should configure the same reference bandwidth on all OSPF routers in the network. 192.168.3.0/25 192.168.4.0/24 OSPF Cost OSPF Area 0 The OSPF cost to a destination is the total cost 172.16.1.0/28.2 192.168.2.0/24 of the ‘outgoing/exit interfaces’.14 G2/0 G3/0 203.0.113.0/30 G2/0.254 For example, R1’s cost to reach 192.168.4.0/24.1 G0/0 G0/0 is : R1 R2 100 (R1 G0/0) + 100 (R2 G1/0) + 100 (R4 G1/0).1.2 10.0.12.0/30 = 300 G1/0.1.1 G1/0 10.0.13.0/30 Loopback interfaces have a cost of 1 10.0.24.0/30 What is R1’s cost to reach 2.2.2.2 (R2’s G0/0.2.2 G0/0 loopback0 interface)?.1 10.0.34.0/30.2 100 (R1 G0/0) + 1 (R2 L0) = 101 R3 R4 F2/0 F2/0.126 G1/0 G1/0.254 192.168.3.0/25 192.168.4.0/24 OSPF Cost OSPF Area 0 **BEFORE (reference bandwidth 100) 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 G1/0.1.1 G1/0 10.0.13.0/30 10.0.24.0/30 G0/0.2.2 G0/0.1 10.0.34.0/30.2 R3 R4 F2/0 F2/0.126 G1/0 G1/0.254 192.168.3.0/25 192.168.4.0/24 OSPF Cost OSPF Area 0 **AFTER (reference bandwidth 100,000) 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 G1/0.1.1 G1/0 10.0.13.0/30 10.0.24.0/30 G0/0.2.2 G0/0.1 10.0.34.0/30.2 R3 R4 F2/0 F2/0.126 G1/0 G1/0.254 192.168.3.0/25 192.168.4.0/24 OSPF Cost OSPF Area 0 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 G1/0.1.1 G1/0 10.0.13.0/30 10.0.24.0/30 G0/0.2.2 G0/0.1 10.0.34.0/30.2 R3 R4 F2/0 F2/0.126 G1/0 G1/0.254 192.168.3.0/25 192.168.4.0/24 OSPF Cost One more option to change the OSPF cost of an interface is to change the bandwidth of the interface with the bandwidth command. The formula to calculate OSPF cost is reference bandwidth / interface bandwidth Although the bandwidth matches the interface speed by default, changing the interface bandwidth doesn’t actually change the speed at which the interface operates. The bandwidth is just a value that is used to calculate OSPF cost, EIGRP metric, etc. To change the speed at which the interface operates, use the speed command. Because the bandwidth value is used in other calculations, it is not recommended to change this value to alter the interface’s OSPF cost. It is recommended that you change the reference bandwidth, and then use the ip ospf cost command to change the cost of individual interfaces if you want. OSPF Cost Three ways to modify the OSPF cost: 1) Change the reference bandwidth: R1(config-router)# auto-cost reference-bandwidth megabits-per-second 2) Manual configuration R1(config-if)# ip ospf cost cost 3) Change the interface bandwidth R1(config-if)# bandwidth kilobits-per-second OSPF Neighbors Making sure that routers successfully become OSPF neighbors is the main task in configuring and troubleshooting OSPF. Once routers become neighbors, they automatically do the work of sharing network information, calculating routes, etc. When OSPF is activated on an interface, the router starts sending OSPF hello messages out of the interface at regular intervals (determined by the hello timer). These are used to introduce the router to potential OSPF neighbors. The default hello timer is 10 seconds on an Ethernet connection. Hello messages are multicast to 224.0.0.5 (multicast address for all OSPF routers) OSPF messages are encapsulated in an IP header, with a value of 89 in the Protocol field. G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 OSPF Neighbors – Down State OSPF is activated on R1’s G0/0 interface. It sends an OSPF hello message to 224.0.0.5. It doesn’t know about any OSPF neighbors yet, so the current neighbor state is Down. Hello My RID: 1.1.1.1 Neighbor RID: 0.0.0.0 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 Down OSPF Neighbors – Init State When R2 receives the Hello packet, it will add an entry for R1 to its OSPF neighbor table. In R2’s neighbor table, the relationship with R1 is now in the Init state. Init state = Hello packet received, but own router ID is not in the Hello packet Hello My RID: 1.1.1.1 Neighbor RID: 0.0.0.0 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 Down Init OSPF Neighbors – 2-way State R2 will send a Hello packet containing the RID of both routers. R1 will insert R2 into its OSPF neighbor table in the 2-way state. R1 will send another Hello message, this time containing R2’s RID. Now both routers are in the 2-way state. Hello My RID: 2.2.2.2 Neighbor RID: 1.1.1.1 Hello My RID: 1.1.1.1 Neighbor RID: 2.2.2.2 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 Down Init 2-way OSPF Neighbors – 2-way State The 2-way state means the router has received a Hello packet with its own RID in it. If both routers reach the 2-way state, it means that all of the conditions have been met for them to become OSPF neighbors. They are now ready to share LSAs to build a common LSDB. In some network types, a DR (Designated Router) and BDR (Backup Designated Router) will be elected at this point. (I will talk about OSPF network types and DR/BDR elections in Day 28) G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 Down Init 2-way OSPF Neighbors – Exstart State The two routers will now prepare to exchange information about their LSDB. Before that, they have to choose which one will start the exchange. They do this in the Exstart state. The router with the higher RID will become the Master and initiate the exchange. The router with the lower RID will become the Slave. To decide the Master and Slave, they exchange DBD (Database Description) packets. DBD I’ll be the master. G0/0 G0/0 R1 R2.1 DBD.2 10.0.12.0/30 No, I’ll be the master. Down Init 2-way Exstart OSPF Neighbors – Exchange State In the Exchange state, the routers exchange DBDs which contain a list of the LSAs in their LSDB. These DBDs do not include detailed information about the LSAs, just basic information. The routers compare the information in the DBD they received to the information in their own LSDB to determine which LSAs they must receive from their neighbor. DBD I have these LSAs. G0/0 G0/0 R1 R2.1 DBD.2 10.0.12.0/30 I have these LSAs. Down Init 2-way Exstart Exchange OSPF Neighbors – Loading State In the Loading state, routers send Link State Request (LSR) messages to request that their neighbors send them any LSAs they don’t have. LSAs are sent in Link State Update (LSU) messages. The routers send LSAck messages to acknowledge that they received the LSAs. LSR Give me these LSAs. LSU Here are the LSAs. LSAck Thanks for the LSAs! G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 Down Init 2-way Exstart Exchange Loading OSPF Neighbors – Full State In the Full state, the routers have a full OSPF adjacency and identical LSDBs. They continue to send and listen for Hello packets (every 10 seconds by default) to maintain the neighbor adjacency. Every time a Hello packet is received, the ‘Dead’ timer (40 seconds by default) is reset. If the Dead timer counts down to 0 and no Hello message is received, the neighbor is removed. The routers will continue to share LSAs as the network changes to make sure each router has a complete and accurate map of the network (LSDB). G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 Down Init 2-way Exstart Exchange Loading Full OSPF Neighbors Connection between R1,R2 comes up (or OSPF is activated) Down State Init State Hello: RID 1.1.1.1, neighbor RID 0.0.0.0 2-way State Hello: RID 2.2.2.2, neighbor RID 1.1.1.1 Hello: RID 1.1.1.1, neighbor RID 2.2.2.2 R2 R1 (DR/BDR ELECTION) RID: 1.1.1.1 Exstart State RID: 2.2.2.2 DBD Packets, Master/Slave determined Exchange State DBD Packets, describe content of LSDB (LSAs) Loading State LSR, LSU, LSAck (Share LSAs to synchronize LSDB) Full State OSPF In OSPF, there are three main steps in the process of sharing LSAs and determining the best route to each destination in the network. 1) Become neighbors with other routers connected to the same segment. 2) Exchange LSAs with neighbor routers. 3) Calculate the best routes to each destination, and insert them into the routing table. OSPF Neighbors Connection between R1,R2 comes up (or OSPF is activated) Down State Init State Become Hello: RID 1.1.1.1, neighbor RID 0.0.0.0 neighbors 2-way State Hello: RID 2.2.2.2, neighbor RID 1.1.1.1 Hello: RID 1.1.1.1, neighbor RID 2.2.2.2 R2 R1 (DR/BDR ELECTION) RID: 1.1.1.1 Exstart State RID: 2.2.2.2 DBD Packets, Master/Slave determined Exchange Exchange State LSAs DBD Packets, describe content of LSDB (LSAs) Loading State LSR, LSU, LSAck (Share LSAs to synchronize LSDB) Full State OSPF Type Name Purpose 1 Hello Neighbor discovery and maintenance. Summary of the LSDB of the router. Database Description 2 Used to check if the LSDB of each router is the (DBD) same. Link-State Request 3 Requests specific LSAs from the neighbor. (LSR) Link-State Update 4 Sends specific LSAs to the neighbor. (LSU) Link-State Acknowledgement Used to acknowledge that the router received a 5 message. (LSAck) OSPF Neighbors OSPF Area 0 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 G1/0.1.1 G1/0 10.0.13.0/30 10.0.24.0/30 G0/0.2.2 G0/0.1 10.0.34.0/30.2 R3 R4 F2/0 F2/0.126 G1/0 G1/0.254 192.168.3.0/25 192.168.4.0/24 OSPF Configuration OSPF Area 0 172.16.1.0/28.2 192.168.2.0/24.14 G2/0 G3/0 203.0.113.0/30 G2/0.254.1 G0/0 G0/0 R1 R2.1.2 10.0.12.0/30 You can activate OSPF directly on an interface G1/0.1.1 G1/0 with this command: 10.0.13.0/30 R1(config-if)#ip ospf process-id area area 10.0.24.0/30 G0/0.2.2 G0/0.1 10.0.34.0/30.2 Configure ALL interfaces as OSPF passive R3 R4 F2/0 F2/0 interfaces: R1(config-router)#passive-interface default.126 G1/0 G1/0.254 Then configure specific interfaces as active: R1(config-router)#no passive-interface int-id 192.168.3.0/25 192.168.4.0/24 OSPF Configuration Things we covered OSPF metric (cost) Reference bandwidth / interface bandwidth = cost (values less than 1 are converted to 1) Default reference bandwidth = 100 mbps Modify the reference bandwidth: R1(config-router)# auto-cost reference-bandwidth megabits-per-second Manually configure the cost of an interface: R1(config-if)# ip ospf cost cost Modify the interface bandwidth: R1(config-if)# bandwidth kilobits-per-second Total cost of outgoing interfaces = metric of the route Things we covered Becoming OSPF neighbors Things we covered More OSPF Configuration Activate OSPF directly on an interface: R1(config-if)# ip ospf process-id area area-id Configure all interfaces as passive interfaces by default: R1(config-router)# passive-interface default Quiz 1 Put the OSPF neighbor states in the correct order: 1. 2-way Down 2. 3. Exchange Exstart 4. Full 5. Init 6. Loading 7. Quiz 1 Put the OSPF neighbor states in the correct order: 1. Down 2. Init 3. 2-way 4. Exstart 5. Exchange 6. Loading 7. Full Quiz 2 Which statement is about OSPF’s default cost is correct? a) All interfaces have the same cost. b) Ethernet and FastEthernet interfaces have the same cost. c) FastEthernet, Gigabit Ethernet, and 10Gig Ethernet interfaces have the same cost. d) Ethernet, FastEthernet, Gigabit Ethernet, and 10Gig Ethernet interfaces have the same cost. Reference bandwidth / interface bandwidth = cost (values less than 1 are converted to 1) Default reference bandwidth = 100 mbps Quiz 3 In which OSPF neighbor state are the Master and Slave roles decided? a) Exstart b) 2-way c) Exchange d) Loading Quiz 4 Which of these commands can be used to make a FastEthernet interface have an OSPF cost of 100? a) R1(config-router)# auto-cost reference bandwidth 100 b) R1(config-router)# auto-cost reference bandwidth 1000 c) R1(config-router)# auto-cost reference bandwidth 10000 d) R1(config-router)# auto-cost reference bandwidth 100000 Reference bandwidth / interface bandwidth = cost 10000 / 100 = 100 Quiz 5 What are the default OSPF Hello / Dead timers on an Ethernet connection? (all times are in seconds) a) Hello: 2, Dead: 20 b) Hello: 10, Dead: 40 c) Hello: 30, Dead: 120 d) Hello: 60, Dead: 180 Supplementary Materials Review flash cards (link in the description) Packet Tracer lab JCNP-Level Channel Members *as of August 11th, 2020

Use Quizgecko on...
Browser
Browser