当前位置:网站首页>Introduction to static routing and dynamic routing protocols OSPF and rip and static routing configuration commands
Introduction to static routing and dynamic routing protocols OSPF and rip and static routing configuration commands
2022-07-29 03:28:00 【Yang Jianye】
- Static routing protocol :
- Static routing (Static routing) Generally speaking , The network administrator adds the routing table item by item . Even if network conditions have changed or been reconfigured , Static routing will not change . One advantage of static routing is high network security . Dynamic routing requires routers to exchange their routing tables frequently , The analysis of routing table can reveal the network topology and network address information . therefore , For the sake of network security, static routing can also be used . It doesn't take up network bandwidth , Because static routing does not generate update traffic . Static routing is suitable for small and medium-sized networks .
- Dynamic routing protocol :
- 1、OSPF:
- Open shortest paths take precedence (Open Shortest Path First,OSPF) Protocol is a link state protocol . Each router is responsible for discovering 、 Maintain relationships with neighbors , The known neighbor list and link cost LSU(Link State Update) Message description , Through reliable flooding and autonomous systems AS(Autonomous System) Other routers in the network interact periodically , Learn the network topology of the whole autonomous system ; And inject other information through the router at the boundary of the autonomous system AS Routing information for , To get the whole Internet Routing information for . Every other specific time or when the link state changes , To regenerate the LSA, The router sends the new data through the flooding mechanism LSA(Link-State Advertisement Link status notification ) Announce it , In order to realize the real-time update of routing .OSPF The protocol takes the cost as the measure :OSPF The protocol is designed , The impact of link bandwidth on routing metrics is considered .OSPF The protocol takes the cost value as the standard , The link overhead is inversely proportional to the link bandwidth , The higher the bandwidth , The smaller the cost ,OSPF The route selection is mainly based on the bandwidth factor .
- OSPF The protocol relies on five different types of packets to establish adjacency and exchange routing information , Greeting Group 、 Database description group 、 Link status request packet 、 Link state update packet and link state confirmation packet .
- 1、 To greet (Hello) grouping
OSPF Use Hello Establish and maintain adjacency relationships in groups . Before a router can distribute its neighbor information to other routers , Must first greet its neighbors .
- 1、 To greet (Hello) grouping
- 2、 Database description (Data base Description,DBD) grouping
DBD The grouping does not contain complete “ Link state database ” Information , Contains only a summary of each entry in the database . When a router is first connected to the network , Or just recovered from the failure , It needs to be complete “ Link state database ” Information . here , The router first passes hello Establish two-way communication relationship with neighbors in groups , Then you will receive feedback from each neighbor DBD grouping . The newly connected router will check all profiles , Then send one or more link state request packets , Retrieve the complete entry information .
- 2、 Database description (Data base Description,DBD) grouping
- 3、 Link status request (Link State Request,LSR) grouping
LSR Packets are used to request neighbors to send details of some entries in their link state database . When a router exchanges database description packets with its neighbors , If it is found that some entries in the link state database are missing or expired , Just use LSR Packet to get the newer part of the neighbor link state database .
- 3、 Link status request (Link State Request,LSR) grouping
- 4、 Link status update (Link State Update,LSU) grouping
LSU Packets are used to respond to link state request packets , Flooding can also be realized when the link state changes (flooding). In the process of network operation , As long as the link state of a router changes , The router will use LSU, Use the flooding method to update the link status to the whole network .
- 4、 Link status update (Link State Update,LSU) grouping
- 5、 Link status confirmation (Link State Acknowledgment,LSAck) grouping
LSAck Packets are used to reply to link state update packets , Confirm it , Thus, the flooding method adopted by the link state update packet becomes reliable .
- 5、 Link status confirmation (Link State Acknowledgment,LSAck) grouping
- 2、RIP:
- Routing information protocol RIP(Routing Information Protocol) It is a routing protocol based on distance vector algorithm , Using the number of jumps as the measurement standard . In bandwidth 、 Low requirements for configuration and management , It is mainly suitable for small-scale networks .
- Huawei and Cisco related configuration commands to be supplemented
- There are two ways to configure static routes : Static routing with next hop router , And static routing with outgoing interface :
Static routing configuration with next hop router :
router(config)#hostname A ( Change the router host name )
A(config)#interface f0/0 ( Access interface f0/0)
A(config-if)#ip address 192.168.1.1 255.255.255.0 ( Set interface ip Address and subnet mask )
A(config-if)#no shutdown ( Enable interface )
A(config)#interface f0/1
A(config-if)#ip address 192.168.2.1 255.255.255.0
A(config-if)#no shutdown
A(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2 ( Target segment IP Address Destination subnet mask next router interface ip Address )
router(config)#hostname B
B(config)#interface f0/0
B(config-if)#ip address 192.168.3.1 255.255.255.0
B(config-if)#no shutdown
B(config)#interface f0/1
B(config-if)#ip address 192.168.2.2 255.255.255.0
B(config-if)#no shutdown
B(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
Configure static routing configuration with next hop router :ip route 192.168.3.0 255.255.255.0 192.168.2.2
It means : stay HOSTA On , The destination network segment seen by the router is 192.168.3.0 Data packets of , Send the packet to 192.168.2.2 On .
When there are two or more static routes that point to the same target address but have different exits on the same route or switching device , Traffic sent to the destination address will be load balanced from these outlets .
Static routing configuration with outgoing interface :
router(config)#hostname A ( Change the router host name )
A(config)#interface f0/0 ( Access interface f0/0)
A(config-if)#ip address 192.168.1.1 255.255.255.0 ( Set interface ip Address and subnet mask )
A(config-if)#no shutdown ( Enable interface )
A(config)#interface f0/1
A(config-if)#ip address 192.168.2.1 255.255.255.0
A(config-if)#no shutdown
A(config)#ip route 192.168.3.0 255.255.255.0 f0/1( Target segment IP Address The destination subnet mask sends out the interface ( Router A))
router(config)#hostname B
B(config)#interface f0/0
B(config-if)#ip address 192.168.3.1 255.255.255.0
B(config-if)#no shutdown
B(config)#interface f0/1
B(config-if)#ip address 192.168.2.2 255.255.255.0
B(config-if)#no shutdown
B(config)#ip route 192.168.1.0 255.255.255.0 f0/1( Target segment IP Address The destination subnet mask sends out the interface ( Router B))
Configure static routing configuration with outgoing interface :ip route 192.168.3.0 255.255.255.0 f0/1
It means : stay HOSTA On , The destination network segment seen by the router is 192.168.3.0 Data packets of , Send the packet to f0/1 On .
When there are two or more static routes that point to the same target address but have different exits on the same route or switching device , Traffic sent to the destination address will be load balanced from these outlets .
- Generally, we set it to point to IP, That is, static routing with next hop router .
边栏推荐
- How close can QA be to business code Direct exposure of defects through codediff
- 1.4 nn. Module neural network (II)
- Idea configuration web container and war packaging
- Photo scale correction tool: DxO viewpoint 3 direct mount version
- How to realize multi line annotation in MATLAB
- GJB常见混淆概念
- C obtains JSON format data asynchronously from the web address
- Matlab learning - accumulation of small knowledge points
- 逐步分析类的拆分之案例——五彩斑斓的小球碰撞
- Target detection, industrial defects, image segmentation -- deep learning data set induction
猜你喜欢

Introduction to JVM foundation I (memory structure)

"PHP Basics" output approximate value of PI

Arm architecture and neural network

Simple code implementation of decision tree

接口自动化测试实践指导(上):接口自动化需要做哪些准备工作

Summary of basic knowledge points of C language

exness:鸽派决议帮助黄金反弹,焦点转向美国GDP

Score addition and subtraction of force deduction and brushing questions (one question per day 7/27)

Example analysis of while, repeat and loop loops in MySQL process control

Rdkit II: use rdkit screening to screen 2D pharmacophores of chemical small molecules
随机推荐
Sleuth+Zipkin 来进行分布式服务链路的追踪
Suffix automata (SAM) board from Jly
HDU multi School Game 2 1011 DOS card
Learn exkmp again (exkmp template)
Swing V2: towards a larger model with larger capacity and higher resolution
How close can QA be to business code Direct exposure of defects through codediff
Rdkit II: use rdkit screening to screen 2D pharmacophores of chemical small molecules
Naive Bayes -- continuous data
最新二开版漫画小说听书三合一完整源码/整合免签接口/搭建教程/带采集接口
深入C语言(1)——操作符与表达式
2 neural network toolbox NN
Tonight at 7:30 | is the AI world in the eyes of Lianjie, Jiangmen, Baidu and country garden venture capital continue to be advanced or return to the essence of business
后缀自动机(sam)板子 from jly
Introduction and advanced level of MySQL (12)
简历竟然敢写精通并发编程,那你说说AQS为什么要用双向链表?
Let's talk about the summary of single merchant function modules
How to deploy sentinel cluster of redis
GJB常见混淆概念
NXP i.mx8mp-deepviewrt
Division and description of military technical documents