In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
[TOC]
Preface
OSPF routing protocol is a link-state routing protocol used in Internet Protocol (IP) networks. The protocol uses the Interior Gateway Protocol (IGP) of the link-state routing algorithm and works within a single autonomous system (AS). The OSPFv2 protocol definition for IPv4 is defined by RFC 2328 OSPFv3 5340. RFC 5340 defines the OSPFv3 for IPv6.
Open shortest path first (Open Shortest Path First,OSPF) is a widely used dynamic routing protocol, which belongs to link-state routing protocol. It has the advantages of fast convergence of routing changes, no routing loop, support for variable length subnet mask (VLSM) and aggregation, hierarchical area division and so on. After using the OSPF protocol in the network, most of the routes will be calculated and generated by the OSPF protocol without manual configuration by the network administrator. When the network topology changes, the protocol can automatically calculate and correct the route, which greatly facilitates the network management. However, if the use is not combined with the specific network application environment, without detailed planning, the effect of OSPF protocol will be greatly reduced, and even lead to failure.
OSPF protocol is a link-state protocol. Each router is responsible for discovering and maintaining the relationship with its neighbors, describing the known neighbor list and link cost LSU (Link State Update) messages, learning the network topology of the whole autonomous system through reliable flooding and periodic interaction with other routers in the autonomous system AS (Autonomous System), and injecting routing information of other AS through the routers at the boundary of the autonomous system to get the routing information of the whole Internet. Every other specific time or when the link state changes, the LSA is regenerated, and the router advertises the new LSA through the flooding mechanism in order to achieve real-time routing updates.
1: basic concepts and working processes of OSPF Overview of 1.1:OSPF routing protocols 1.1.1: autonomous Systems (AS)
Multiple areas where routes run the same routing process protocol become AS area systems.
1.1.2: interior Gateway Protocol (IGP)
A process protocol for running within an area
Such as: RIP,OSPF,ISIS, etc.
1.1.3: external Gateway Protocol (EGP)
Process agreement for running outside the area
1.1.4:OSPF is a link-state routing protocol
The working process of 1.2:OSPF 1.2.1: establishing a neighbor list
As shown in the figure, A learns all the link-state information, that is, all the network segment information, by establishing adjacencies.
1.2.2: link-state database
A stores the learned link-state information in its own link-state database.
1.2.3: form the routing table
The link-state database of A calculates the shortest path of A to each location through Dijkstra algorithm, and forms the shortest path tree. Finally, the routing table is generated.
The basic concept of 1.3:OSPF 1.3.1:OSPF region
OSPF is divided into several regions within the AS, among which there must be one backbone region, and there is only one backbone region. The backbone area is responsible for the dissemination of inter-regional routing information.
In addition, other areas must be forwarded through the backbone area, and all areas must be directly connected to the backbone area!
Others are called standard areas or non-backbone areas.
The region ID can represent a decimal number in the layer. Namely area 0 (0-9)
Each OSPF router maintains only complete link-state information in its area
1.3.2:Router ID
The IP address that uniquely identifies the router within the OSPF area.
1.3.3:Router ID selection rules
The loopback interface is preferred as the most Router ID, because loopback is a virtual interface on the router, so that Router ID is not affected even if the physical port is damaged.
You can also use the router-id command to specify Router ID. This order is commonly used by us.
1.3.4:DR and BDR
In DR, BDR, and other routes
1 DR: the primary route in the area, with one and only one
2 BDR: backup route in the area, with one and only one
3 except DR and BDR are all other routes
Other routers only form adjacencies with DR and BDR. The primary route is responsible for advertising information, and the backup route is responsible for preparing to replace DR.
Other routers can only send messages to DR and BDR (a multicast), and DR sends advertised messages (a second multicast). There are two multicast messages.
DR and BDR are responsible for monitoring messages from other routes.
The election method of 1.3.5:DR and BDR
The routing priority, also known as the "administrative distance" of the route, is a positive integer with a range of 0,255, which is used to specify the priority of the routing protocol.
The common OSPF routing priority is 110.
The election process of 1.3.6:DR and BDR
The priority of a router can affect an election process, but it cannot force the replacement of an existing DR or BDR router.
That is, the first OSPF router we start will become DR. The router of the second boot OSPF will become BDR. The third and later open routers cannot change the existing DR and BDR, no matter how short the path is.
Multicast address of 1.3.7:OSPF
224.0.0.5 DR/BDR
224.0.0.6 issued by other rout
The measure of 1.3.8:OSPF is COST
COST= 10 ^ 8 / BW BW (bandwidth) the smaller the COST number system, the better, which means the higher the bandwidth
The lower the COST, the higher the bandwidth, and the shorter the path.
The shortest path is calculated based on the cost cost specified by the interface
2: packet type of OSPF 2.1:OSPF packet
Carried in an IP packet, using protocol number 89
2.2:OSPF packet type OSPF packet type description Hello packet is used to discover and maintain neighbor relationships, elect DR and BDR database description package (DBD) to send summary information to neighbors to synchronize link-state database link-state request packet (LSR) after the router receives the DBD containing the new information, it is used to request more detailed information. Link-state update packets (LSU) send link-state advertisements (LSA) after receiving LSR A LSU packet may contain several LSA link-state acknowledgement packets (LSAck) acknowledging that LSU has been received, and each LSA needs to be acknowledged separately
Establishment of OSPF adjacency relationship 3.1:OSPF adjacency (7 states) state description Down state only knows its own ID, ports that do not know any other router Init state (initialization state) Down state automatically activate init state, at this time, they can only receive Hello packets, cannot send Hello packets 2-Way state route system loads are completed from the Init state to 2-Way state. In the 2-Way state, you can either receive Hello packets or send Hello packets (the two largest Router ID are elected, but the master-slave routing identity is not determined) the ExStart status (quasi-startup state) determines the master-slave routing identity. That is, determine the identity of DR and BDR. Exchange status exchanges DBD information base, and there will also be LSACK packets when received. Loading is the busiest state, with the most types of packets. There are LSR,LSU (including multiple LSA) and LSACK. The routing table formed by Full starts to forward packets in steady state.
Network type of 3.2:OSPF
Consider the use of OSPF (application environment) in the following aspects
Characteristics of 3.4:OSPF (key points)
Comparison between 3.5:OSPF and RIP
Four: OSPF single domain configuration 4.1:OSPF basic configuration commands
5: OSPF single domain configuration experiment 5.1: experimental purpose
Configure OSPF to realize interworking of the whole network
5.2: environment
GNS3 software
Three initialization routers
Two initialization hosts
5.3: experimental process (seven steps)
5.4: summary
1. Make sure the IP address is not mistaken.
two。 Configure the Router ID command:
Int loopback 0
Ip add 1.1.1.1 255.255.255.255
No shut
3. Configure OSPF command
Router ospf 1 (the process number of the router must be the same in the same area)
Router-id 1.1.1.1 (enter router id)
Network 192.168.10.0 0.0.0.255 area 0 (declares directly connected network segments and areas)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.