Quản trị mạng - Chapter 11: Ospf

The encrypted authentication • Create a plain text password: – Router(config-if)#ip ospf message-digest-key {keyid} md5 {password} • Enable authentication on all interfaces: – Router(config-router)#area {area-number} authentication message-digest • Or • Enable authentication on an interface: – Router(config-if)# ip ospf authentication messagedigest

pdf99 trang | Chia sẻ: nguyenlam99 | Ngày: 09/01/2019 | Lượt xem: 63 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Quản trị mạng - Chapter 11: Ospf, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
1Chapter 11: OSPF CCNA Exploration version 4.0 Học viện mạng Bách Khoa - Website: www.bkacad.com 2 Objectives • Describe the background and basic features of OSPF • Identify and apply the basic OSPF configuration commands • Describe, modify and calculate the metric used by OSPF • Describe the Designated Router/Backup Designated Router (DR/BDR) election process in multiaccess networks • Describe the uses of additional configuration commands in OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 3 Introduction Học viện mạng Bách Khoa - Website: www.bkacad.com 4 Introduction to OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 5 Background of OSPF • Began in 1987 • 1989 OSPFv1 released in RFC 1131 This version was experimental & never deployed • 1991 OSPFv2 released in RFC 1247 • 1998 OSPFv2 updated in RFC 2328 • 1999 OSPFv3 published in RFC 2740 Background of OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 6 Single Area OSPF Concepts: OSPF terminology Học viện mạng Bách Khoa - Website: www.bkacad.com 7 Single Area OSPF Concepts: OSPF terminology Học viện mạng Bách Khoa - Website: www.bkacad.com 8 OSPF area Học viện mạng Bách Khoa - Website: www.bkacad.com 9 OSPF Message Encapsulation Học viện mạng Bách Khoa - Website: www.bkacad.com 10 OSPF Packet Types Học viện mạng Bách Khoa - Website: www.bkacad.com 11 Hello Protocol Học viện mạng Bách Khoa - Website: www.bkacad.com 12 1.Discover OSPF neighbors and establish neighbor adjacencies. 2.Advertise parameters on which two routers must agree to become neighbors. 3.Elect the Designated Router (DR) and Backup Designated Router (BDR) on multiaccess networks like Ethernet and Frame Relay. Hello Protocol Học viện mạng Bách Khoa - Website: www.bkacad.com 13 • OSPF Hello Intervals –Usually multicast (224.0.0.5) –Sent every 30 seconds for NBMA segments –Sent every 10 seconds for Multi access network • OSPF Dead Intervals –This is the time that must be expired before the neighbor is considered down –Default time is 4 times the hello interval Hello Protocol Học viện mạng Bách Khoa - Website: www.bkacad.com 14 Hello Protocol Học viện mạng Bách Khoa - Website: www.bkacad.com 15 Hello Protocol • Electing a DR and BDR –Designated Router (DR): DR is responsible for updating all other OSPF routers (called DROthers) –Backup Designated Router (BDR): This router takes over DR’s responsibilities if DR fails Học viện mạng Bách Khoa - Website: www.bkacad.com 16 • Purpose of a Link State Update (LSU): –Used to deliver link state advertisements • Purpose of a Link State Advertisement (LSA) –Contains information about neighbors & path costs OSPF Link-state Updates Học viện mạng Bách Khoa - Website: www.bkacad.com 17 OSPF Link-state Updates Học viện mạng Bách Khoa - Website: www.bkacad.com 18 Extra: How routing information is maintained when a failure is occurs Network 1 is down LSAs LSAs LSAs 1. When a failure occurs in the network, such as a neighbor becomes unreachable 2. Link-state protocols flood LSAs using a special multicast address throughout an area. 3. Each link-state router takes a copy of the LSA, updates its link-state/topological database. 4. The link-state router will then forward the LSA to all neighboring devices. 5. LSAs cause every router within the area to recalculate routes. Because LSAs need to be flooded throughout an area Note: all routers within that area need to recalculate their routing tables ==> the number of link-state routers that can be in an area should be limited Area x Học viện mạng Bách Khoa - Website: www.bkacad.com 19 OSPF Algorithm Học viện mạng Bách Khoa - Website: www.bkacad.com 20 Administrative Distance Học viện mạng Bách Khoa - Website: www.bkacad.com 21 • Purpose is to encrypt & authenticate routing information • This is an interface specific configuration • Routers will only accept routing information from other routers that have been configured with the same password or authentication information • Note: Authentication does not encrypt the router's routing table. OSPF Authentication Học viện mạng Bách Khoa - Website: www.bkacad.com 22 Basic OSPF Configuration Học viện mạng Bách Khoa - Website: www.bkacad.com 23 Lab Topology Học viện mạng Bách Khoa - Website: www.bkacad.com 24 Addressing Học viện mạng Bách Khoa - Website: www.bkacad.com 25 • R1(config)#router ospf process-id • Process ID:  A locally significant number between 1 and 65535  Does not have to match other OSPF routers The router ospf command Học viện mạng Bách Khoa - Website: www.bkacad.com 26 • Router(config-router)# network network- address wildcard-mask area area-id • wildcard mask - the inverse of the subnet mask. The network address along with the wildcard mask is used to specify the interface or range of interfaces that will be enabled for OSPF using this network command. • area-id – Area-id refers to the OSPF area. – OSPF area is a group of routers that share link state information The network command Học viện mạng Bách Khoa - Website: www.bkacad.com 27 The network command Học viện mạng Bách Khoa - Website: www.bkacad.com 28 Router ID ? OSPF Router ID Học viện mạng Bách Khoa - Website: www.bkacad.com 29 • Commands used to verify current router ID – Show ip protocols – Show ip ospf – Show ip ospf interface OSPF Router ID Học viện mạng Bách Khoa - Website: www.bkacad.com 30 • Router ID & Loopback addresses – Highest loopback address will be used as router ID if router-id command isn’t used – Advantage: loopback interface cannot fail  OSPF stability • The OSPF router-id command: Introduced in IOS 12.0  Router(config)#router ospf process-id  Router(config-router)#router-id ip-address • Modifying the Router ID – Router#clear ip ospf process OSPF Router ID Host Mask Học viện mạng Bách Khoa - Website: www.bkacad.com 31 OSPF Router ID Học viện mạng Bách Khoa - Website: www.bkacad.com 32 • Duplicate Router IDs • When two routers have the same router ID in an OSPF, domain routing may not function properly. – If the router ID is the same on two neighboring routers, the neighbor establishment may not occur. • When duplicate OSPF router IDs occur, IOS will display a message similar to: %OSPF-4-DUP_RTRID1: Detected router with duplicate router ID OSPF Router ID Học viện mạng Bách Khoa - Website: www.bkacad.com 33 Verifying OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 34 Verifying OSPF • Neighbor ID - The router ID of the neighboring router. • Pri - The OSPF priority of the interface. This is discussed in a later section. • State - The OSPF state of the interface. FULL state means that the router and its neighbor have identical OSPF link- state databases. OSPF states are discussed in CCNP. • Dead Time - The amount of time remaining that the router will wait to receive an OSPF Hello packet from the neighbor before declaring the neighbor down. This value is reset when the interface receives a Hello packet. • Address - The IP address of the neighbor's interface to which this router is directly connected. • Interface - The interface on which this router has formed adjacency with the neighbor. Học viện mạng Bách Khoa - Website: www.bkacad.com 35 Reasons of no adjacency • Two routers may not form an OSPF adjacency if: – The subnet masks do not match, causing the routers to be on separate networks. – OSPF Hello or Dead Timers do not match. – OSPF Network Types do not match. – There is a missing or incorrect OSPF network command. Học viện mạng Bách Khoa - Website: www.bkacad.com 36 Command Description Show ip protocols Displays OSPF process ID, router ID, networks router is advertising & administrative distance Show ip ospf Displays OSPF process ID, router ID, OSPF area information & the last time SPF algorithm calculated Show ip ospf interface Displays hello interval and dead interval Verifying OSPF - Additional Commands Verifying OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 37 show ip protocols Học viện mạng Bách Khoa - Website: www.bkacad.com 38 show ip ospf Học viện mạng Bách Khoa - Website: www.bkacad.com 39 show ip ospf • A network that cycles between an up state and a down state is referred to as a flapping link. • A flapping link can cause OSPF routers in an area to constantly recalculate the SPF algorithm, preventing proper convergence. – To minimize this problem, the router waits 5 seconds (5000 msecs) after receiving an LSU before running the SPF algorithm. This is known as the SPF schedule delay. – In order to prevent a router from constantly running the SPF algorithm, there is an additional Hold Time of 10 seconds (10000 msecs). The router waits 10 seconds after running the SPF algorithm before rerunning the algorithm again. Học viện mạng Bách Khoa - Website: www.bkacad.com 40 show ip ospf interface Học viện mạng Bách Khoa - Website: www.bkacad.com 41 show ip ospf database Học viện mạng Bách Khoa - Website: www.bkacad.com 42 • Note: OSPF does not automatically summarize at major network boundaries Examining the routing table Học viện mạng Bách Khoa - Website: www.bkacad.com 43 The OSPF Metric Học viện mạng Bách Khoa - Website: www.bkacad.com 44 OSPF Metric • OSPF uses cost as the metric for determining the best route – Best route ~ lowest cost – Cost • 108 / bandwidth – Reference bandwidth  defaults to 100Mbps  can be modified using  auto-cost reference- bandwidth command Học viện mạng Bách Khoa - Website: www.bkacad.com 45 • COST of an OSPF route – Is the accumulated value from one router to the next OSPF Metric Học viện mạng Bách Khoa - Website: www.bkacad.com 46 • Usually the actual speed of a link is different than the default bandwidth –Bandwidth value does not actually affect the speed of the link; it is used by some routing protocols to compute the routing metric. • The show interface command will display interface’s bandwidth –Most serial link default to 1.544Mbps OSPF Metric Học viện mạng Bách Khoa - Website: www.bkacad.com 47 OSPF Metric Học viện mạng Bách Khoa - Website: www.bkacad.com 48 • Both sides of a serial link should be configured with the same bandwidth Router(config-if)#bandwidth bandwidth-kbps R1(config)#interface serial 0/0/0 R1(config-if)#ip ospf cost 1562 Modifying the Cost of a link Học viện mạng Bách Khoa - Website: www.bkacad.com 49 Modifying the Cost of a link Học viện mạng Bách Khoa - Website: www.bkacad.com 50 • Difference between bandwidth command & the ip ospf cost command –Ip ospf cost command Sets cost to a specific value –Bandwidth command Link cost is calculated Modifying the Cost of a link Học viện mạng Bách Khoa - Website: www.bkacad.com 51 Modifying the Cost of a link Học viện mạng Bách Khoa - Website: www.bkacad.com 52 OSPF and Multiaccess Networks Học viện mạng Bách Khoa - Website: www.bkacad.com 53 • OSPF defines 5 network types: 1. Point-to-point 2. Broadcast Multiaccess 3. Nonbroadcast Multiaccess (NBMA) 4. Point-to-multipoint 5. Virtual links Challenges in Multi-access Networks Học viện mạng Bách Khoa - Website: www.bkacad.com 54 OSPF in Multi-access Networks • 2 challenges presented by multi-access networks – Multiple adjacencies – Extensive LSA flooding Học viện mạng Bách Khoa - Website: www.bkacad.com 55 • Extensive flooding of LSAs – For every LSA sent out there must be an acknowledgement of receipt sent back to transmitting router. –  lots of bandwidth consumed and chaotic traffic OSPF in Multi-access Networks Học viện mạng Bách Khoa - Website: www.bkacad.com 56 • Solution to LSA flooding issue is the use of – Designated router (DR) – Backup designated router (BDR) • DR & BDR selection – Routers are elected to send & receive LSA • Sending & Receiving LSA – DRothers send LSAs via multicast 224.0.0.6 to DR & BDR – DR forward LSA via multicast address 224.0.0.5 to all other routers OSPF in Multi-access Networks Học viện mạng Bách Khoa - Website: www.bkacad.com 57 OSPF in Multi-access Networks Học viện mạng Bách Khoa - Website: www.bkacad.com 58 DR/BDR Election Process • DR/BDR elections DO NOT occur in point to point networks Học viện mạng Bách Khoa - Website: www.bkacad.com 59 DR/BDR Election Process • DR/BDR elections will take place on multi-access networks as shown below Học viện mạng Bách Khoa - Website: www.bkacad.com 60 • Criteria for getting elected DR/BDR 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. DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 61 DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 62 DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 63 DR/BDR Election Process • Timing of DR/BDR Election –Occurs as soon as 1st router has its interface enabled on multi-access network –When a DR is elected it remains as the DR until one of the following occurs 1. The DR fails. 2. The OSPF process on the DR fails. 3. The multiaccess interface on the DR fails. Học viện mạng Bách Khoa - Website: www.bkacad.com 64 DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 65 DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 66 DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 67 DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 68 DR/BDR Election Process Học viện mạng Bách Khoa - Website: www.bkacad.com 69 OSPF in Multi-access Networks • Manipulating the election process 1. Boot up the DR first, followed by the BDR, and then boot all other routers, OR 2. Shut down the interface on all routers, followed by a no shutdown on the DR, then the BDR, and then all other routers. Học viện mạng Bách Khoa - Website: www.bkacad.com 70 • Manipulating the DR/BDR election process continued –Router(config-if)#ip ospf priority {0 - 255} Priority number range 0 to 255 •0 means the router cannot become the DR or BDR •1 is the default priority value OSPF Interface Priority Học viện mạng Bách Khoa - Website: www.bkacad.com 71 OSPF Interface Priority Học viện mạng Bách Khoa - Website: www.bkacad.com 72 More Học viện mạng Bách Khoa - Website: www.bkacad.com 73 OSPF neighbor relationships progress through seven states: not exchanged information Send Hello packets to establish a relationship with neighbor routers. There are 2 kinds of relationship Each router keeps a list of adjacent neighbor, called the Adjacency databese. OSPF interfaces can be in one of seven states. Học viện mạng Bách Khoa - Website: www.bkacad.com 74 OSPF routers progress through the following 5 distinct steps of operation: 1.Establish router adjacencies 2.Elect a DR and BDR, if necessary 3.Discover routes 4.Select the appropriate routes to use 5.Maintain routing information Steps in the operation of OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 75 1.Establish router adjacencies Học viện mạng Bách Khoa - Website: www.bkacad.com 76 2.Elect a DR and BDR, if necessary Học viện mạng Bách Khoa - Website: www.bkacad.com 77 3.Discover routes Học viện mạng Bách Khoa - Website: www.bkacad.com 78 4.Select the appropriate routes to use Học viện mạng Bách Khoa - Website: www.bkacad.com 79 5.Maintain Routing Information 1 2 3 Học viện mạng Bách Khoa - Website: www.bkacad.com 80 More OSPF Configuration Học viện mạng Bách Khoa - Website: www.bkacad.com 81 • Router connected to ISP  Called an autonomous system border router  Used to propagate a default route • Example of static default route • R1(config)#ip route 0.0.0.0 0.0.0.0 loopback 1 • Requires the use of the default-information originate command • Example of default-information originate command • R1(config-router)#default-information originate Redistributing an OSPF Default Route Học viện mạng Bách Khoa - Website: www.bkacad.com 82 Example default route Học viện mạng Bách Khoa - Website: www.bkacad.com 83 Example default route Học viện mạng Bách Khoa - Website: www.bkacad.com 84 Example default route Học viện mạng Bách Khoa - Website: www.bkacad.com 85 Example default route Học viện mạng Bách Khoa - Website: www.bkacad.com 86 • Since link speeds are getting faster it may be necessary to change reference bandwidth values –Do this using the auto-cost reference- bandwidth command –Example:  R1(config-router)#auto-cost reference-bandwidth 1000 Fine-Tuning OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 87 Fine-Tuning OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 88 • Reason to modify timers  Faster detection of network failures • Manually modifying Hello & Dead intervals  Router(config-if)#ip ospf hello- interval seconds  Router(config-if)#ip ospf dead- interval seconds • Point to be made  Hello & Dead intervals must be the same between neighbors Modifying OSPF timers Học viện mạng Bách Khoa - Website: www.bkacad.com 89 Configuring Simple OSPF authentication • The clear-text authentication • Create a plain text password: – Router(config-if)#ip ospf authentication-key {password} • Enable authentication on all interfaces: – Router(config-router)#area {area-number} authentication • Or • Enable authentication on an interface: – Router(config-if)# ip ospf authentication Học viện mạng Bách Khoa - Website: www.bkacad.com 90 Configuring Simple OSPF authentication • The encrypted authentication • Create a plain text password: – Router(config-if)#ip ospf message-digest-key {key- id} md5 {password} • Enable authentication on all interfaces: – Router(config-router)#area {area-number} authentication message-digest • Or • Enable authentication on an interface: – Router(config-if)# ip ospf authentication message- digest • Note: key-id and password must to match on all routers on the same link Học viện mạng Bách Khoa - Website: www.bkacad.com 91 Configuring Simple OSPF authentication • The encrypted authentication OSPF redistribution • Planning Redistribution • Locate the boundary router between two routing processes. • Determine which routing process is the core or backbone process • Determine which routing process is the edge or migration process • Select a method for injecting the required edge protocol routes into the core. 92Học viện mạng Bach Khoa - Website: www.bkacad.com Học viện mạng Bách Khoa - Website: www.bkacad.com 93 Configuring Redistribution into OSPF • Use this command to redistribute routes into OSPF: Router(config-router)# redistribute protocol [process-id] [metric metric-value] [metric-type type-value] [route-map map- tag] [subnets] [tag tag-value] • Default metric is 20 or 1. • Default metric type is 2. • Subnets do not redistribute by default. Học viện mạng Bách Khoa - Website: www.bkacad.com 94 Configuring Redistribution into OSPF RtrA(config)# router ospf 1 RtrA(config-router)# redistribute eigrp ? Autonomous system number RtrA(config-router)# redistribute eigrp 100 ? metric Metric for redistributed routes metric-type OSPF/IS-IS exterior metric type for redistributed routes route-map Route map reference subnets Consider subnets for redistribution into OSPF tag Set tag for routes redistributed into OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 95 Configuring Redistribution into OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 96 Extra: E1-E2 routes Học viện mạng Bách Khoa - Website: www.bkacad.com 97 Extra: RIPv1 versus OSPF Học viện mạng Bách Khoa - Website: www.bkacad.com 98 Summary Học viện mạng Bách Khoa - Website: www.bkacad.com 99

Các file đính kèm theo tài liệu này:

  • pdfca_ex_s2m11_ospf_667_4916.pdf
Tài liệu liên quan