当前位置:网站首页>Configure static routing and rip routing protocols
Configure static routing and rip routing protocols
2022-07-21 06:15:00 【Programming Lindaiyu】
One 、 Experimental principle :
1. Routing technology : Router works in OSI The network layer of the reference model , Its important role is to select the best path for packets , It's finally delivered to the destination . In a network with only one network segment , Packets can easily reach the destination host from the source host , but If a computer wants to communicate with a computer other than this network segment , Packets may go through many routers . This will face a very important problem —— How to choose the path to the destination ? There are many paths for packets from one host to another , But obviously , One of these paths is always the best at some point ( The fastest ) Of . therefore , In order to improve the network access speed as much as possible ( efficiency ), There needs to be a method to determine the best path from the source host to the destination host , So as to forward data . This is routing technology
2. How routers work : First, let's look at how the router works . By means of PC Setting the default gateway on the can make the computers in the LAN and Internet signal communication , Actually in PC The default gateway set on is the Ethernet port of the router IP Address . If the computer in the LAN wants to communicate with the computer outside , Just submit the request to the Ethernet port of the router , The next work is done by the router . Therefore, it can be said that the router is the transit station of the Internet , Packets in the network are forwarded to the destination network through one router after another .
3. How the router forwards packets : How to forward packets when router ? It's like a person going to travel somewhere , First of all, I have to look at the map in my mobile phone , Good introduction , This map is the routing table . In the routing table , Including all destination network addresses mastered by the router , And the best way to reach these networks through this router . This best path refers to an interface of the router or the address of the next hop router . Because of the existence of routing table , Routers can efficiently forward packets .
4. Static routing : Static routing refers to the routing information manually configured by users or network administrators . Route entries are dependent on direct routes . The router needs to forward the data to the non directly connected network segment , You need to add static routes on the router . Static routing is the interface of the next router directly connected to the router IP Address or local interface of the router itself . Static routing is used for small-scale networks 、 A network with a relatively fixed topology .
5. Dynamic routing : Dynamic routing is the communication between routers in the network , Passing routing information , The process of updating the routing table with the received routing information . It can adapt to the changes of network structure in real time . If the route update information indicates that the network has changed , The routing software will recalculate the routing , And send out new route update information . This information goes through the various networks , Cause each router to restart its routing algorithm , And update their routing tables to dynamically reflect the changes of network topology . Dynamic routing is suitable for large-scale networks 、 Network topology complex network .
Two 、 step :
1. Connection topology : First, we need three Router , Two sets of PC host , Use cross wires to interconnect . Then annotate each port ip Gateway and mask . Here's the picture .
2. Configure the host : According to comments , On the desktop of the host IP The configuration page can configure the host IP Address , Subnet mask and gateway , With PC0 For example , Here's the picture .
3. Configure the interface on the router ip Address : With Route1 For example , Statement for :
int Fa0/1 # Access interface
ip address 201.0.0.1 255.255.255.0 # To configure ip Address
no shut # start-up
Exit # sign out
int Fa0/0 # Access interface
ip address 202.0.0.1 255.255.255.0 # To configure ip Address
no shut # start-up
Exit # sign out
When the configuration is complete , Each connection point should be green , Adjacent points can be connected . Here's the picture .
4. Configure... On the router Static routing , Realize cross network segment communication .
before this , We need to understand the relevant principles : Direct and non directly connected segments , Also called direct and non direct routing .
(1) Direct link routing : Local interface configuration IP After the address and subnet mask ports are opened, a direct connection route is formed .
(2) Indirect routing : Not a local interface configuration IP After the address and subnet mask interfaces are turned on, a non direct route is formed .
Direct routing is generated after configuration , however , For indirect routing, you should tell the router to go which A road , It requires the equipment operator to set the route himself .
(3) Configure static routing : Global configuration mode ,ip route Destination network Mask Next jump .
In the above picture Route1 For example , Yes Route1 Come on 202.0.0.0 and 203.0.0.0 Is the direct network segment ,201.0.0.0 and 204.0.0.0 That is, the non direct network segment , Equipment personnel are required to configure the route by themselves .Route1 To go to the non direct network segment 201.0.0.0, because ip by 202.0.0.2 The interface of Fa0/0 With routers Route1 It's directly connected , So the next jump should be ip by 202.0.0.1 The interface of Fa0/0.
So for Route0 The configuration statement is as follows :
about Route1:
about Route2:
5. Connect PC0 and PC1, Verify whether the static route is configured successfully , The following results indicate that the configuration is successful .
6. dynamic RIP route : In global configuration mode ,router rip, Get into rip Pattern ,Router(config-router)# Announce direct network ,network network address .
(1) about route0 Configure as follows :
Look at its routing table :
(2) about route1 Configure as follows :
Look at its routing table :
(3) about route2 Configure as follows :
Look at its routing table :
7. Connect PC0 and PC1, verification rip Whether the dynamic route is successfully configured , The following results indicate that the configuration is successful .
边栏推荐
- Redis key hierarchical format
- 【u-boot】u-boot运行主线分析【03】—board_init_r
- Redis hash type
- Redis-Hash类型
- 子网掩码的作用
- Simulation analysis of bulk acoustic wave resonator based on two-dimensional phononic crystal
- 体验了一把线上CPU100%及应用OOM的排查和解决过程
- look out! A "pit" matched by regular test()
- Query the space occupied by a table and the amount of data in the table
- 2022年个人理财产品都有哪些种类?
猜你喜欢
Winform中实现窗体控件适配(自适应窗体)布局_通过C#代码方式
《ASP.NET Core 6框架揭秘》实例演示[02]:基于路由、MVC和gRPC的应用开发
配置静态路由和 RIP 路由协议
仍旧是同步问题
知识点滴 - 有关剧本的网站
ASP.NET Core 6框架揭秘实例演示[01]: 编程初体验
Ankerui motor monitoring scheme low voltage motor circuit and feeder distribution circuit power energy monitoring
低代码开发平台搭建会展服务管理系统案例分析
Custom persistence layer framework myormframework (II) - Framework Design
look out! A "pit" matched by regular test()
随机推荐
R语言使用逻辑回归Logistic、单因素方差分析anova、异常点分析和可视化分类iris鸢尾花数据集
从源码角度看JedisPoolConfig参数配置
云原生平台,让边缘应用玩出花!
仍旧是同步问题
Kettle [practice 03] details of difficulties in classification, analysis and warehousing of KML type files in Shuijing micrograph (complete process example cloud resource sharing: including sql+kjb+kt
配置静态路由和 RIP 路由协议
Jenkins配置插件界面中文显示「建议收藏」
基于CLAR架构打造的宝马i3,并非是简单的“油改电”产品
qt 实现日历美化
7 hyperLogLog
大数处理--使用案例
Maybe it's the next generation data specification of WebGIS - OGC API series
8 redis database management
UE4(unreal engine4)地形编辑工具中的无法显示样条线
安全行业从业者自研开源扫描器合辑
6G: typical applications, key technologies and challenges
strcat() - 连接字符串
Human body recognition system based on active learning and Wi Fi perception
Redis-List类型
一起来自定义loader吧