Above we have realized that RIP (routing Information Protocol) &EIGRP (Enhanced Gateway Routing protocol), we come to know the following routing protocol OSPF (Open Shortest Path precedence protocol) also called it as an interface-sensitive routing protocol.
OSPF Link State Protocol
(Open short Path first) Open Shortest route priority protocol
Let's take a look at the OSPF protocol at 1.1 o ' walk slowly.
1, the OSPF routing protocol is a typical link state routing protocol (link-state).
A, OSPF uses the SPF algorithm to calculate the shortest path to the destination.
B, Link: Refers to the router interface.
C, Status: Refers to the description of the current interface and its relationship with neighboring routers.
So others will also put the OSPF link state protocol as the interface state routing protocol.
2. Management Distance:
The administrative distance for OSPF is: 5, 170, rip:110
3. Multicast address:
ospf:224.0.0.5, 224.0.0.6
eigrp:224.0.0.10
rip:224.0.0.9
4. Measure value (METIRC):
RIP: Use a hop count as a measure (hops).
EIGRP: measure = (10^7/bandwidth bandwidth+ delay) *256
OSPF: Measures are calculated using cost.
OSPF metric cost Calculation formula = Sum of cost of all link-in interfaces;
Interface Cost Calculation formula = 100m/bandwidth (bps) rounding; The value of the loopback interface is 1.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/27/wKioL1R5_gTxxo4LAAIBaK32tWA782.jpg "title=" 1.png " Width= "718" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:300px; "alt=" wkiol1r5_ Gtxxo4laaibak32twa782.jpg "/>
5, Router-id
OSFP on the Router-id is similar to the real name, the same area (as number) is unique, so some people say: Router-id is a unique identifier in the OSPF domain router ID
How did the Routre-id get here?
Router-id determine the following 2 kinds of methods:
1, manually determined by the administrator.
2, automatically selected by the router:
A, if there is a Loopback port, the Loopback port IP address is the largest choice for the route Router-id
B, if there is no loopback port, that is, to see the current active physical interface IP address, select the IP address of the largest use of the router's router-id.
Note: 1, when the IP address is selected, the class C IP address takes precedence over the class B IP address.
2, the physical interface must be active state.
3. RIDs are not preemptive and need to be used (clear IP OSPF process) command if you want new rids to be effective
4. If the physical interface of the activity is used (secondary configuration IP), the physical interface does not participate in the RID election.
5, change the cost of the interface command: IP OSPF cost XX (directly into the interface, XX is the value to change)
6. Several messages of OSPF.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/27/wKioL1R6Bm2jyM45AAHaThhCj0c231.jpg "title=" 3.png " Width= "718" height= "233" border= "0" hspace= "0" vspace= "0" style= "width:718px;height:233px;" alt= " Wkiol1r6bm2jym45aahathhcj0c231.jpg "/>
7. OSPF Three sheets:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/28/wKiom1R6BY6TdGFiAAM7UM0JH9c976.jpg "title=" 2.png " Width= "718" height= "329" border= "0" hspace= "0" vspace= "0" style= "WIDTH:718PX;HEIGHT:329PX;" alt= " Wkiom1r6by6tdgfiaam7um0jh9c976.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/29/wKioL1R6tHSijN4wAALV8lPu8n4565.jpg "title=" 4.png " Width= "718" height= "253" border= "0" hspace= "0" vspace= "0" style= "width:718px;height:253px;" alt= " Wkiol1r6thsijn4waalv8lpu8n4565.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/2A/wKiom1R6tlzjXTn6AALkYoC7pQA956.jpg "title=" 5.png " Width= "718" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:250px; "alt=" Wkiom1r6tlzjxtn6aalkyoc7pqa956.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/29/wKioL1R6t_uihZlnAAPQfSI7W7E914.jpg "title=" 6.png " Width= "718" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:250px; "alt=" Wkiol1r6t_ Uihzlnaapqfsi7w7e914.jpg "/>
8. Neighbor Relations & Neighboring relations
neighbor: A neighbor can be two or more routes, and there is one or more interfaces between these routers connected to the same network.
adjacency: refers to the relationship between two adjacent routers running the OSPF process, which allows the two routers to Exchange routing information data updates directly between 22, and OSPF only exchanges routing information with neighboring neighbors, but not all of the routers that become neighbors will establish adjacency relationships.
The establishment of the neighbor relationship: Two connected routers, and the OSPF process is running on each connected interface, they find each other through the Hello Packet exchange, the Hello packet information (Hello Time/dead Time/router-id/authentication) is consistent, When the relationship between the two sides reached 2-way, the neighbor relationship was established between the two routers.
At this point the two routers have not reached the adjacency relationship, so only the hello message is exchanged, and there is no interactive link state database.
The establishment of neighboring relations: the two sides on the basis of the adjacent, and then send the Dbd/lsr/lsu/lsack message, the last two sides reached the synchronization, and the relationship also turned full state, the two sides are considered to establish a neighboring relationship.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/2A/wKiom1R6vCygi81vAADSAvcMWNo151.jpg "title=" 7.png " Width= "718" height= "346" border= "0" hspace= "0" vspace= "0" style= "width:718px;height:346px;" alt= " Wkiom1r6vcygi81vaadsavcmwno151.jpg "/>
Neighbors are mainly found by the HELLO package and establish a neighbor relationship. Send AllSPFRouters via 224.0.0.5来.
9. Election of DR/BDR:
Why elect DR/BDR?
A: Multiple access broadcasts in OSPF will cause LSA flooding in the network, and in order to reduce the OSPF traffic for multiple accesses, a dr/bdr,dr/will be elected in a multi-access broadcast network. The BDR will monitor the broadcast traffic for this set of multicast addresses 224.0.0.4, and in the multi-access MA network, all the Drouter routers will only establish adjacency with DR/BDR, not all neighbors, so the flooding will not flood the entire network, just through Dr /BDR uses unicast 224.0.0.5 for multicast.
1. DR and BDR have their own multicast address: 224.0.0.6
2, all "point-to" network does not carry out DR/BDR election, all "broadcast" network will carry out DR/BDR election.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/2B/wKiom1R6x2qz0hj9AACgipCRsLs191.jpg "title=" 8.png " alt= "Wkiom1r6x2qz0hj9aacgipcrsls191.jpg"/>
3. DR/BDR Election rules:
A, the highest OSPF interface priority owner is elected DR, by default: The multi-access network default priority is 1, point-to-point access to the network has a priority level of 0. So if you configure the default level to O, you do not participate in the DR/BDR election.
The command to change the OSPF precedence is: (CONFIG-IF) Used (in the process of the interface) #ip OSPF priority 100)
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/2A/wKioL1R6zwfwiGYzAACG41z0g40091.jpg "title=" 9.png " alt= "Wkiol1r6zwfwigyzaacg41z0g40091.jpg"/>
B, if the interface priority is consistent, then the interface with the highest Router-id is elected as Dr.
4, DR/BDR has to check the preemption. (That is, when the DR/BDR election succeeds, even if the new router has a higher interface priority than the current DR, also does not give the Dr Preemption, also only if the Dr hangs, BDR does not exist or re-election, can seize)
5. DR/BDR re-election rules:
A, re-router (reset)
B, use the command (clear IP OSPF process) not necessarily.
6. Specify the Router (DR): Used to update OSPF information between the event broadcast routers.
7. Alternate designated router (BDR): The DR is monitored and replaced by Dr when the Dr fails.
10. OSPF Network type:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/2B/wKiom1R63WnT9WZCAAGnWYPjN1k809.jpg "title=" 10.png "Width=" 718 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:300px; "alt=" Wkiom1r63wnt9wzcaagnwypjn1k809.jpg "/>
11. Area:
Why divide the region??
A: 1, reduce the amount of SPF, so that the SPF operation is only involved in the area of the link, reduce the CPU and internal load.
2, reduce the LSA flooding area, the effective use of bandwidth.
3, at the border easy to do flow control.
4, in the border router to do the route summary, reduce the routing table entries, optimize the routing table.
5, multi-region to improve the scalability of the network, conducive to the creation of large-scale network.
6, multi-region is helpful to improve the convergence of the network.
7, multi-region is conducive to improve the stability of the network.
1. Classification of regions: Backbone area, standard area, peripheral difference, complete peripheral area, virtual link
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/2C/wKiom1R65QHw06_hAACcYEqK3sE580.jpg "title=" 11.png "Width=" 718 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:300px; "alt=" wkiom1r65qhw06_ Haaccyeqk3se580.jpg "/>
A, backbone area (Backbone): By default, area 0 is the backbone. Responsible for the exchange of information in each region. Routes within the backbone area must be contiguous, and other zones must be connected to the backbone area.
B, peripheral area (Stub-area): Only receive internal OSPF updates, not receive LSA-5 updates.
C, Virtual Link: When the backbone of the fault zone or due to the design of the cause of the current network routing and backbone areas are not directly connected to a remediation network.
D, complete peripheral network: Only the receiving area inside the OSPF update, do not receive LSA-3.
===============================================================================
Basic experiment:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/2B/wKioL1R67tuSSGMjAAGUYhV13Cw456.jpg "title=" 12.png "Width=" 718 "height=" 430 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:430px; "alt=" Wkiol1r67tussgmjaaguyhv13cw456.jpg "/>
Related BASIC configuration: (You can also download the attachment)
R1#conf T
R1 (config) #no IP domain lo
R1 (config) #lin Co 0
R1 (config-line) #logg sy
R1 (Config-line) #exec-T 0 0
R1 (config-line) #lin vty 0 4
R1 (config-line) #pass hznethome
R1 (Config-line) #login
R1 (Config-line) #end
--------------------------------------------------
R1 (config) #int Lo 0
R1 (config-if) #ip Add 1.1.1.1 255.255.255.0
R1 (config-if) #no sh
R1 (config-if) #int S0/1
R1 (config-if) #ip add 192.168.12.1 255.255.255.0
R1 (config-if) #no sh
R1 (config-if) #int s0/0
R1 (config-if) #ip add 192.168.13.1 255.255.255.0
R1 (config-if) #no sh
---------------------------------------------------
R1 (config) #router OS 100
R1 (config-router) #router-id 1.1.1.1
R1 (config-router) #net 192.168.13.0 0.0.0.255 ar 0
R1 (config-router) #net 1.1.1.1 0.0.0.255 ar 0
R1 (Config-router) #end
============================================================
R2#conf T
R2 (config) #no IP domain lo
R2 (config) #lin Co 0
R2 (config-line) #logg sy
R2 (Config-line) #exec-T 0 0
R2 (config-line) #lin vty 0 4
R2 (config-line) #pass hznethome
R2 (Config-line) #login
R2 (Config-line) #end
----------------------------------------------------
R2#conf T
R2 (config) #int Lo 0
R2 (config-if) #ip add 2.2.2.2 255.255.255.0
R2 (config-if) #no sh
R2 (config-if) #int S0/2
R2 (config-if) #ip add 192.168.12.2 255.255.255.0
R2 (config-if) #no sh
R2 (config-if) #int s0/0
R2 (config-if) #ip add 192.168.24.2 255.255.255.0
R2 (config-if) #no sh
R2 (config-if) #end
--------------------------------------------------------
R2 (config) #router OS 100
R2 (config-router) #router-id 2.2.2.2
R2 (config-router) #net 192.168.12.0 0.0.0.255 ar 0
R2 (config-router) #net 192.168.24.0 0.0.0.255 ar 0
R2 (config-router) #net 2.2.2.2 0.0.0.255 ar 0
R2 (Config-router) #end
========================================================
R3#conf T
R3 (config) #no IP domain lo
R3 (config) #lin Co 0
R3 (config-line) #logg sy
R3 (Config-line) #exec-T 0 0
R3 (config-line) #lin vty 0 4
R3 (config-line) #pass hznethome
R3 (Config-line) #login
R3 (Config-line) #end
----------------------------------------------------
R3#conf T
R3 (config) #int Lo 0
R3 (config-if) #ip add 3.3.3.3 255.255.255.0
R3 (config-if) #no sh
R3 (config-if) #int s0/0
R3 (config-if) #ip add 192.168.13.3 255.255.255.0
R3 (config-if) #no sh
R3 (config-if) #int S0/3
R3 (config-if) #ip add 192.168.34.3 255.255.255.0
R3 (config-if) #no sh
R3 (config-if) #end
-------------------------------------------------------
R3#conf T
R3 (config) #router OS 100
R3 (config-router) #router-id 3.3.3.3
R3 (config-router) #net 192.168.13.0 0.0.0.255 ar 0
R3 (config-router) #net 192.168.34.0 0.0.0.255 ar 0
R3 (config-router) #net 3.3.3.3 0.0.0.255 ar 0
R3 (Config-router) #end
==================================================================
R4#conf T
R4 (config) #no IP domain lo
R4 (config) #lin con 0
R4 (config-line) #logg sy
R4 (Config-line) #exec-T 0 0
R4 (config-line) #lin vty 0 4
R4 (config-line) #pass hznethome
R4 (Config-line) #login
R4 (Config-line) #end
-----------------------------------------------------
R4#conf T
R4 (config) #int Lo 0
R4 (config-if) #ip add 4.4.4.4 255.255.255.0
R4 (config-if) #no sh
R4 (config-if) #int s0/0
R4 (config-if) #ip add 192.168.24.4 255.255.255.0
R4 (config-if) #no sh
R4 (config-if) #int S0/3
R4 (config-if) #ip add 192.168.34.4 255.255.255.0
R4 (config-if) #no sh
-----------------------------------------------------
R4#conf T
R4 (config) #router OS 100
R4 (config-router) #router-id 4.4.4.4
R4 (config-router) #net 4.4.4.4 0.0.0.255 ar 0
R4 (config-router) #net 192.168.24.0 0.0.0.255 area 0
R4 (config-router) #net 192.168.34.0 0.0.0.255 ar 0
R4 (Config-router) #end
=============================================================================
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/2C/wKiom1R678yjjmmVAANrsd56-c8557.jpg "title=" 14.png "Width=" 718 "height=" 331 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:331px; "alt=" Wkiom1r678yjjmmvaanrsd56-c8557.jpg "/>
Check the routing table first to see if the routing table is complete.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/2C/wKiom1R6732z9EvdAAJasnDxnE8954.jpg "title=" 13.png "Width=" 718 "height=" 292 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:718px;height:292px; "alt=" Wkiom1r6732z9evdaajasndxne8954.jpg "/>
After we test the ping, we can see that the experiment is successful!
Finally finished, although still incomplete, but barely passable, ha ....
Good luck to you all!!!
This article is from the "Last Bus" blog, so be sure to keep this source http://hznethome.blog.51cto.com/722914/1584797
CCNA Study Notes (vi)--routing Protocol (OSPF)