当前位置:网站首页>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 .
边栏推荐
- MYCAT read / write separation configuration
- 1.6 example: cifar-10 classification
- Minesweeping simple version
- 04 | background login: login method based on account and password (Part 1)
- 1.5 nn. Module neural network (III)
- Server operation management system
- Shardingsphere's level table practice (III)
- How to deploy sentinel cluster of redis
- three. JS Part 54 how to pass structure array to shader
- How to realize multi line annotation in MATLAB
猜你喜欢

ROS - create workspace

Ten thousand words detailed Google play online application standard package format AAB
![[technology 1]](/img/eb/63baf1ae3931a156a0a5b377a9b7d1.jpg)
[technology 1]

Realize multi-level linkage through recursion

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

力扣刷题之数组序号计算(每日一题7/28)

Design of smoke temperature, humidity and formaldehyde monitoring based on single chip microcomputer

Redis之sentinel哨兵集群怎么部署

3D advanced renderer: artlandis studio 2021.2 Chinese version

Shardingsphere's level table practice (III)
随机推荐
Idea configuration web container and war packaging
Example analysis of while, repeat and loop loops in MySQL process control
深入C语言(3)—— C的输入输出流
What is eplato cast by Plato farm on elephant swap? Why is there a high premium?
Simple code implementation of K-means clustering
3.2 model saving and loading
Suffix automata (SAM) board from Jly
Sleuth+Zipkin 来进行分布式服务链路的追踪
接口自动化测试实践指导(上):接口自动化需要做哪些准备工作
Web uploader cannot upload multiple files
Introduction and advanced level of MySQL (12)
GJB common confused concepts
机器学习【Numpy】
"PHP Basics" output approximate value of PI
Machine learning [numpy]
Multiline text omission
AI_ Drug: VAE of molecular generation model (I)
Learn exkmp again (exkmp template)
Implement Lmax disruptor queue from scratch (VI) analysis of the principle of disruptor solving pseudo sharing and consumers' elegant stopping
复现20字符短域名绕过以及xss相关知识点