当前位置:网站首页>Basic configuration of NP and OSPF
Basic configuration of NP and OSPF
2022-04-22 05:19:00 【费】
OSPF It is a very extensive dynamic routing protocol based on link state , It has a region (Area) Hierarchical structure , Good scalability , Fast convergence , Suitable for deployment on networks of all sizes .
stay OSPF in , Every router must have one Route-ID To identify yourself . In order to make OSPF The network is more stable and reliable , Routers are usually enabled Loopback Interface , And configure specific IP Address , And use this address as your own Route-ID.
OSPF The agreement defines 4 There are two different types of networks , They are broadcast networks ( Also known as Broadcast The Internet ),NBMA(Non-Broadcast Multi-Access) The Internet 、 Point to point networks ( Also known as Point-to-Point or P2P The Internet ), And point to multipoint networks ( Also known as Point-to-Multipoint The Internet , or P2MP The Internet ). On the radio network and NBMA In the network , An election is needed DR(Designated Router) and BDR(Backup Designated Router).DR and BDR It is through the router interface DR It depends on the priority , The router with the highest priority will be selected as DR, The second was elected BDR; If DR The interface priority of is the same , Has the highest Router-ID The router that will be elected DR, Then he was elected BDR.
// master OSPF Basic configuration
// Observation and understanding DR\BDR The election process of
//OSPF Modification method of interface overhead
//OSPF The role of passive interfaces
//OSPF Configuration of authentication function
Here's the picture , The whole network is running OSPF.R1、R2、R3 The link between is located in the area 0 in ,R2 And R3 The link between is also located in the area as a backup link 0 in ,R2 And R4 The link between is located in the area 1 in ,R3 And R5 The link is located in the area 2 in .R4、R5、R1 Of Loopback 1 The interface simulates the networks in different branches and enterprise headquarters . Through the right OSPF After the configuration , Normal communication shall be realized between the networks of different branches and between the networks of branches and enterprise headquarters .

// To configure OSPF Routing protocol . Each router uses Loopback 0 Interface IP Address as your own Router-ID.





、
、
// see R1 R2 R3 On OSPF The establishment of neighbors .



// Neighbor status is Full, It indicates that the neighborhood relationship has been successfully established .
、
、
// see R1 Of IP Routing table .

// The headquarters router has obtained the route of the network segment where the interfaces of other routers are located .
、
、
// see R4 Of IP Routing table .

//R4 Has also obtained the headquarters , Regional headquarters and branches 2 Routing of all network segments , Now we can communicate with each other .
、
、
// see DR\BDR Election situation . stay DR\BDR In the election process , First, compare the routing interfaces DR priority , The router with the highest priority will be selected as DR, Next is BDR, The rest DRother.DR The default priority is 1,0 The representative will not participate in the election . If the interface DR Same priority , Compare the routing Router-ID, The maximum value is DR, The second is BDR, The rest of the for DRother.
// see R1、R2 DR\BDR Election situation .


//Loopback The network segment of the interface is point-to-point network by default , It can be observed that there is no election on the point-to-point network DR\BDR Of .10.0.12.0/24 For Ethernet segment , The default is broadcast network , So we need an election DR\BDR. Due to the default configuration , therefore R1 Of G0/0/1 R2 Of G0/0/0 Interface DR The priority values are 1, Therefore, it is necessary to compare Router-ID. therefore , Final R2 because Router-ID Larger and elected 10.0.12.0/24 On the network segment DR,R1 Then for BDR. in addition , You can also see that , stay 10.0.24.0/24 Network segment ,R2 Be selected as BDR,R4 Then for DR.
// Now modify R1 Of G0/0/1 Of DR The priority for 2, Hope to make R1 Become 10.0.12.0/24 The network segment DR,R2 by BDR. see DR\BDR Election situation .

// Observed or BDR, because DR\BDR The election is not preemptive . The interface needs to be closed and then opened , Or restart OSPF process , send DR\BDR A new election .
(reset ospf 1 process restart OSPF process )

//R1 Has become 10.0.12.0/24 On the network segment DR.
、
、
// see R2 The routing table for .

// Observation found that R2 visit R3、R5 Of Loopback The next hop of the route of the network segment where the interface is located is R1 Of 10.0.12.1, instead of R3
//tracert You can see the message from R2 To R5 The path .( The message will go through R1 Of 10.0.12.1,R3 Of 10.0.13.3, Then arrive at R5)

//R2 View the interface on OSPF Cost value .

// You can see R2 Of S4/0/0 Interface (10.0.23.2) Of Cost The value is 48,G0/0/0 Interface (10.0.12.2) Of Cost The value is 1. Now modify R2 Of G0/0/0 Interface Cost The value is 2000, take R3 Of G0/0/0 Interface Cost The value is also changed to 2000.


// see R2 The interface of Cost value .( You can see R2 Of G0/0/0 Interface Cost The value has been modified to 2000)

// The message goes directly through R3 arrive R5; Verified Cost The smaller it is , The principle of better routing .

、
、
// To configure OSPF Passive interface , If one OSPF An interface of the router is configured as a passive interface (Passive Interface), Then the interface will not send and receive OSPF The message will, for example R2 Of GE0/0/1 The interface is configured as a passive interface .(R2 And R4 Not established OSPF Neighborhood )

// see R2、R4 Of IP Routing table .


// The observed R2 There are no branches on 1 Network routing , branch 1 Router R4 There are no other network routes on the .
、
、
// To configure OSPF Authentication function .OSPF The configuration of the authentication function can be region based , It can also be interface based . Next , stay R1 The configuration is region based 0 The authentication function of , Use simple plaintext . see R1 Of OSPF Neighborhood information .

// You can see R1 There is no OSPF neighbor , This is because R2、R3 There is no matching authentication function configured on the .R2、R3 Failed to pass R1 Certification of , So I won't establish a neighbor relationship . stay R2、R3 Configure the corresponding authentication function on the .


// see R1 Upper OSPF Neighborhood information .( The neighborhood relationship has been established normally )

// Next , stay R2 The configuration is based on G0/0/1 Interface authentication , And USES the MD5 Ciphertext method .**( see R2 Neighbors of OSPF Information )** With no R4 Build a neighborhood

// stay R4 Of G0/0/0 Configure function authentication on the interface .

// Re in R2 Check out OSPF Neighborhood information .

/ Still no neighbor information , This is because I was in R2 G0/0/1 The passive interface is configured on the interface , The interface will not receive and send messages . Now delete OSPF 1 View neighbor information through the passive interface in .

R4 I already have it in my neighbor information R2.

版权声明
本文为[费]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210625304154.html
边栏推荐
- The eleventh job of MySQL database - Application of view
- MySQL double master and double slave + atlas data test
- 2021-10-17
- scanf、printf的输入输出(格式控制符)
- Three paging query methods of SQL Server
- Summary of database Deadlock: (3.7-3.13)
- Typescript function generics
- Mysql database for the 11th time
- Go language crawler Foundation
- Introduction to swagger UI
猜你喜欢

Stack (C language)

Clonal map of writing in mind

Junit簡介與入門

Error: ER_ NOT_ SUPPORTED_ AUTH_ MODE: Client does not support authentication protocol requested by serv

Nexus private server - (III) using private server warehouse in project practice

Database 13th job transaction management
![[redis notes] data structure and object: Dictionary](/img/0a/0c78c1f897f3a397a87ebb5f138107.png)
[redis notes] data structure and object: Dictionary

Learn from me: how to release your own plugin or package in China

Unity中的UGUI源码解析之事件系统(9)-输入模块(下)
![[C #] remodeling matrix (staggered array)](/img/ae/7ed411e3d9bf8a9080c11a6480a7d6.png)
[C #] remodeling matrix (staggered array)
随机推荐
Analyzing redis distributed locks from the perspective of source code
Error: ER_ NOT_ SUPPORTED_ AUTH_ MODE: Client does not support authentication protocol requested by serv
Take yourself to learn paddle (4)
Interpreter mode (3.7-3.13)
Temperature control via mqc582tt + PNET
数据库(二)MySQL表的增删改查(基础)
What kind of programming language is this to insert into the database
[redis notes] data structure and object: Dictionary
Summary of browser cross domain problems
Status mode (4.4-4.10)
JUnit assertion
Summary of database Deadlock: (3.7-3.13)
Write down the daily temperature
Junit常用注解
Swagger UI简介
Batch resolves the IP address of the domain name and opens the web page
Empty object mode (3.14-3.20)
Leetcode 1557. Minimum number of vertices to reach all nodes
What are the challenges of Internet of things testing, and how do software testing institutions ensure quality
Regular expression of shell script