当前位置:网站首页>MGRE GRE OSPF process in hcip
MGRE GRE OSPF process in hcip
2022-07-24 01:26:00 【Fairy possessed】

One 、 Introduce
Physics line :
What happened :
1, cost ;
2, Geographical constraints
VPN( Virtual private network ):
VPN The core of Technology : Tunnel technology
The core of Tunnel Technology : Packaging technology
Two 、GRE: General routing encapsulation technology
The way we want to go :

The real way :


Tunnel technology : At both ends of the tunnel, a data channel is established in the public network through encapsulation and de encapsulation , Use this data channel to enter Line transmission .
GRE Configuration method :
1, Create a tunnel interface
[r1] interface Tunnel 0/0/0
[r1-Tunnel0/0/0]
2, Interface configuration IP Address
[r1-Tunnel0/0/0] ip address 192.168.3.1 24
3, Define encapsulation method
[r1-Tunnel0/0/0] tunnel-protocol gre
4, Define the content of the package
[r1-Tunnel0/0/0] source 12.0.0.1
[r1-Tunnel0/0/0] destination 23.0.0.2
3、 ... and 、NHRP: Next - Hop Resolution Protocol
NHRP Server for : NHS, Next hop to the resolution server -
NHRP principle : You need to select a device with a fixed exit physical address in the private network as NHS, All remaining branches should Know the tunnel address and physical address of the center , then ,NHRP All branches are required to have their own physical interfaces and tunnels Interface IP The mapping relationship of the address is sent to NHS, If the physical address changes , You need to resend . this sample NHS You can get the mapping relationship of the addresses of all branches . If the branches need to communicate with each other , You need to Apply for the mapping table like the center --- This architecture is called hub-spoke framework .
Four 、MGRE Configuration of :
Configuration of the center :
1, Create a tunnel interface
[r1] interface Tunnel 0/0/0
2, Interface configuration IP Address
[r1-Tunnel0/0/0] ip address 192.168.3.1 24
3, Define encapsulation method
[r1-Tunnel0/0/0] tunnel-protocol gre p2mp
4, Define the content of the package
[r1-Tunnel0/0/0] source 15.0.0.1
5, establish NHRP Domain
[r1-Tunnel0/0/0] nhrp network-id 100
Configuration of branches :
1, Create a tunnel interface
[r1] interface Tunnel 0/0/0
2, Interface configuration IP Address
[r1-Tunnel0/0/0] ip address 192.168.3.1 24
3, Define encapsulation method
[r1-Tunnel0/0/0] tunnel-protocol gre p2mp
4, Define the content of the package
[r2-Tunnel0/0/0] source GigabitEthernet 0/0/1
5, Join the center to create NHRP domain
[r2-Tunnel0/0/0] nhrp network-id 100
6, Report information to the center
[r2-Tunnel0/0/0] nhrp entry 192.168.5.1 15.0.0.1 register
Tunnel address Physical interface address
notes :[r1-Tunnel0/0/0] display nhrp peer all -- see NHRP Registration of neighbors
notes :MGRP Environment when sending data , It is still a point-to-point tunnel , So the data transmission is still point-to-point transport . therefore ,MGRE The environment is similar to NBMA Environment .
5、 ... and 、RIP Realize in MGRE Environmental problems :
1, Only the center gets the routing information of the branch , The branch did not get
reason :rip It is to transmit routing information in the form of broadcast and multicast ; and MGRE Unicast transmission
resolvent : Turn on the pseudo broadcast on the center
[r1-Tunnel0/0/0] nhrp entry multicast dynamic
2, After the center turns on the pseudo broadcast , The branch can only receive the routing information of the center , But there are no branches .
reason :RIP The horizontal segmentation mechanism of
resolvent : close RIP The horizontal division of
[r1-Tunnel0/0/0] undo rip split-horizon
6、 ... and 、OSPF( Open shortest path first protocol )
RIP Version of : RIPV1,RIPV2(IPV4),RIPNG(IPV6)
OSPF Version of :ospfv1( Days off in the Laboratory ),ospfv2(IPV4),ospfv3( IPV6)
RIPV2 and OSPFV2 Similarities :
1,RIPV2(224.0.0.9) and ospfv2(224.0.0.5,224.0.0.6) They all send information in the form of multicast .
224.0.0.X Format multicast address : Local link multicast , And TTL Set to 1, It can only communicate within the range of direct connection
2,RIPV2 and OSPFV2 Are called classless routing protocols .
No category : The subnet mask will be carried when sending routing information
notes :OSPF What is passed is topology information
OSPFV2 It is called classless Routing Protocol :
Because the behavior of routing exists between domains
3,OSPFV2 and RIPV2 All support manual authentication
4,OSPFV2 and RIPV2 All support equal overhead load balancing
RIP and OSPF Difference point :
RIP It can only be used in small networks ,OSPF It can be applied to medium and large networks
RIP The reason why it can only be used in small networks : It takes up a lot of resources
OSPF It can be applied to medium and large networks : because OSPF Support structured deployment
Structured deployment : Is the division of regions , Regional division is to divide large areas into small areas
The purpose of regional division : Transfer topology information within the region , Transfer routing information between regions .
Transfer routing information between regions :
notes :OSPF If the network has only one area , Such a network is called a single area OSPF The Internet ; If there are multiple areas , said For multiple areas OSPF The Internet .
Area border router (ABR equipment ): Belong to multiple areas at the same time , An interface corresponds to an area , And there is an interface in Area 0 in .
notes : There can be multiple... Between regions ABR equipment , One ABR It can also correspond to multiple regions .
OSPF Requirements for area division :
1, There must be... Between areas ABR equipment
2, Region division must be based on star topology , The middle region of star topology is called backbone region .
Area ID(area ID): Distinguish and calibrate ospf Different areas in the network , from 32 Bit binary structure
Area ID(area ID) The way of expression :
1, Dotted decimal means ;
2, Use decimal system directly to express , The backbone area ID Defined as area 0( necessary ).
7、 ... and 、OSPF working process :
1,OSPF Data packets of ( Five kinds of bags )
hello package : Discover in periodic form , The role of building and preserving neighborhood relations
hello Time :10S ( or 30S)
notes : Under different network environments ,hello Time is different , Ethernet (BMA) stay BMA The default under the network hello Time is 10s, But in other networks ,hello Time is 30s
Time of death (Dead time):4 Times hello Time
OSPF And RIP difference :
RID(RouteID)( Used to mark the router ) characteristic :
1, The whole network is unique (OSPF In the network );
2, use the same pattern : The requirements must be in accordance with IP Address format to design , by 32 Bit binary structure .
RID Access method :
1, Manual configuration : Just meet the above two conditions
2, Automatic generation
How to generate automatically :
1, First, check whether the device is equipped with a loopback interface , If it exists, select the loopback interface IP Address as RID; If there are multiple loop back connections mouth , Then the maximum value will be selected ( From front to back ) As RID.
2, If there is no loopback interface , Then the... Of the physical interface of the device will be taken IP Address as RID, If there are multiple physical interfaces , be The one with the largest value will be selected as RID.
DBD package : Database description message
database :LSDB( Link state database ), For storage LSA, Link status notification
LSR package : Link status request message , according to DBD Package comparison , Based on local unknown LSA Message sending request .
LSU package : Link state update message , Really carry LSA Packets of information
LSAck package : Link status acknowledgement message , To ensure the reliability of the transmission
notes :OSPF There is 30min A periodic update .
2,OSPF State machine

TWO-WAY: It marks the establishment of neighbor relations
( Matching conditions ): The match is successful , Then you can enter the next state , If you fail , Will stay in the neighborhood , Use only Hello The package is kept alive periodically .

Principal subordinate relationship election : By comparison RID To carry out ,RID Big for the main , The master can enter the next state first .
notes : Use here DBD Package to complete the master-slave relationship election , Mainly to distinguish from the previous neighbor state .

FULL state : It marks the establishment of adjacency . The purpose is to distinguish from the neighbor state .
notes : Neighbor status can only be used hello The package is kept alive periodically , And the adjacent state can send and receive LSA Information .
down state : start-up ospf after , issue hello After the package, go to the next state init( initialization ) state : received Hello In bag Include local RID, Then enter the next state
Two-way( Two-way communication ) state : It marks the establishment of neighbor relations
( Entry conditions match ): Matching failure , Will stay in the neighborhood , Use only Hello The package is kept alive periodically ; If the match is successful, enter Next state
exstart( Pre start ) state : Use a that does not carry data DBD Package for master-slave relationship election ,RID Big for the main , Priority can be given to Go to the next state
exchange( Quasi exchange ) state : Use... With directory information DBD Package for directory sharing
loading( load ) state : Based on DBD package , Use LSR/LSU/LSACK Three kinds of packet acquisition are unknown LSA ( Link status notification ) Information .
FULL state : It marks the establishment of adjacency .
3,OSPF Working process of
After the startup configuration is completed ,ospf Multicast will be provided to all interfaces running the protocol locally .
224.0.0.5 In the form of hello package ;hello The bag will carry your own local RID And local known neighbors RID; after , Record the collected neighborhood relationships in a local table ( Neighborhood watch ).
After the neighbor relationship is established , Condition matching will be performed . Failure , Stay in the neighborhood , Use only hello The package is kept alive periodically ;
If the matching is successful, the adjacency relationship will be established . First , Use a that does not carry data DBD Package for master-slave relationship election , after , Use... With information DBD Package shared database directory information . after , Local use LSR/LSU/LSACK Three kinds of packets get unknown LSA Information . after , Complete the establishment of local database , Generate database tables (LSDB).
Last , Based on LSA Information , Generate directed graph and shortest path tree , after , Calculate the local routing information to the unknown network segment . Add these routing information to the routing table .
After convergence ,ospf Still every 10s(30s) send out hello The package is kept alive periodically ; every other 30MIN Make a periodic update .
8、 ... and 、OSPF Structural mutation :
1, Add a new network segment : Trigger update , Change the information immediately through LSU package Pass out , need ACK confirm .
2, Disconnect a network segment : Trigger update , Change the information immediately through LSU package Pass out , need ACK confirm .
3, Unable to communicate :dead time
4,OSPF The basic configuration of
1, start-up ospf process
[r1] ospf 1 router-id 1.1.1.1 ---1 Bit process number
[r1-ospf-1]
2, Create area
[r1-ospf-1] area 0
[r1-ospf-1-area-0.0.0.0]
3, Declare
1, Activate interface
2, Publish route
[r1-ospf-1-area-0.0.0.0] network 12.0.0.1 0.0.0.0 --0.0.0.0 Is unmasked
Unmask : Continuous 0 And continuous 1 form ,0 The corresponding bit is immutable ,1 Corresponding to variable , You can make accurate announcements , It's fine too Declare the scope
[r1] display ospf peer --- see ospf My neighbor table
[r1] display ospf peer brief --- View neighbor profile
[r1] display ospf lsdb --- View database tables
[r1] display ospf lsdb router 2.2.2.2 --- Expand a LSA Information
Huawei equipment definition ospf The default priority of the protocol is :10
COST= Reference bandwidth / Real bandwidth
The default reference bandwidth of Huawei equipment is 100Mbps
notes : If the cost value is less than 1 Decimals of , Then directly follow 1 To calculate ; If it is greater than 1 Decimals of , Then take the integer part directly .
Modify the reference bandwidth :
[r1-ospf-1] bandwidth-reference 1000
notes : Modifying the reference bandwidth requires that all OSPF The devices in the network are all changed to the same .
边栏推荐
- c语言支持yaml配置文件通用方法
- Detailed explanation of OSPF in hcip
- [cloud native kubernetes] deployment advanced resource object management under kubernetes cluster
- 面试题之:ArrayList和LinkedList有哪些区别
- C language force deduction question 53 of the largest subarray sum. Dynamic programming and divide and conquer
- Copying readable paths is not easy
- kubernetes 部署 dashboard(可视化界面)
- Kubernetes deployment dashboard (visual interface)
- Concept, key points and summary of postgraduate entrance examination in Polymer Physics
- HCIP第四天笔记
猜你喜欢

Why can't HMI panels of botu V17 and below connect with CPUs of 1500 firmware version 2.9 or 1200 firmware version 4.5?

Hcip day 5 notes

128. Longest continuous sequence

How safe is Volvo XC90? 5 seats and 7 seats are available

HCIP网络类型,ppp会话,数据链路层协议

HCIA的复习

Repeat one sentence Trojan horse

复现一句话木马

SCM learning notes 9 -- Serial Communication (based on Baiwen STM32F103 series tutorials)

HCIP第八天笔记
随机推荐
复制可读路径不好使
Talk about moment of inertia
A little understanding of encoder
Hcip day 6 notes
kubernetes 部署 dashboard(可视化界面)
HCIP第六天_特殊区域综合实验
OSI、TCP/IP(A1)
HCIP实验
1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
OSPF(第四天笔记)
C语言力扣第53题之最大子数组和。动态规划与分治
SCM learning notes 8 -- keys and external interrupts (based on Baiwen STM32F103 series tutorials)
HCIP第六天笔记
HCIA知识点总结
小熊派简介和环境搭建
关 于 路 由
EFCore高级Saas系统下一个DbContext如何支持多数据库迁移
Openresty template real-time rendering Lua resty template
为什么博途V17及以下的HMI面板不能与1500固件版本2.9或1200版本4.5 的CPU建立连接?
Hcip day 8 notes