动态路由概述:
特点:
动态路由协议概述:
度量值:
静态路由与动态路由的比较:
按照路由执行的算法分类:
RIP是距离-矢量路由选择协议(最大跳数为15跳,16跳不可达)
路由器学习到直连路由,更新周期30s到时,路由器会向邻居发送路由表,再过30s,第二个更新周期到了再次发送给路由表。
RIP v1和RIP v2的区别
版本 | RIP v1 | RIP v2 |
区别 | 有类路由协议 | 无类路由协议 |
广播更新 (255.255.255.255) | 组播更新(224.0.0.9) |
不支持VLSM | 支持VLSM |
自动路由汇总,不可关闭 | 自动汇总可关闭,可手工汇总 |
不支持不连续子网 | 支持不连续子网 |
实验拓扑图:
PC1:192.168.10.2/24
R1:
f0/0接口:192.168.10.1/24
f0/1接口:192.168.20.1/30
R2:
f0/0接口:192.168.20.2/30
f0/1接口:192.168.30.1/30
R3:
f0/0接口:192.168.30.2/30
f0/1接口:192.168.40.1/30
PC2:192.168.40.2/24

1,双击打开R1配置接口
R1#conf t 全局模式
R1(config)#int f0/0 配置f0/0接口
R1(config-if)#ip add 192.168.10.1 255.255.255.0
R1(config-if)#no shut 开启
R1(config-if)#int f0/1 配置f0/1接口
R1(config-if)#ip add 192.168.20.1 255.255.255.252
R1(config-if)#no shut 开启
R1(config-if)#do show ip route 查看路由表

2,双击打开R2配置接口
R2#conf t 全局模式
R2(config)#int f0/0 配置f0/0接口
R2(config-if)#ip add 192.168.20.1 255.255.255.252
R2(config-if)#no shut 开启
R2(config-if)#int f0/1 配置f0/1接口
R2(config-if)#ip add 192.168.30.1 255.255.255.252
R2(config-if)#no shut 开启
R2(config-if)#do show ip route 查看路由表

3,双击打开R3配置接口
R3#conf t 全局莫斯
R3(config)#int f0/0 配置f0/0接口
R3(config-if)#ip add 192.168.30.2 255.255.255.252
R3(config-if)#no shut 开启
R3(config-if)#int f0/1 配置f0/1接口
R3(config-if)#ip add 192.168.40.1 255.255.255.252
R3(config-if)#no shut 开启
R3(config-if)#do show ip route 查看路由表信息

4,配置pc1和pc2的ip地址及网关
PC1> ip 192.168.10.2 192.168.10.1 配置pc1的ip地址和网关
PC2> ip 192.168.40.2 192.168.40.1 配置pc2的ip地址和网关


5,此时两台pc机是不能连通的,因为我们没有配置RIP路由协议

6,配置R1,R2,R3的RIP路由协议
R1#conf t 全局模式
R1(config)#router rip 配置R1的RIP路由协议
R1(config-router)#network 192.168.10.0
R1(config-router)#network 192.168.20.0
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#exit

R2#conf t 全局模式
R2(config)#router rip 配置R2的RIP路由协议
R2(config-router)#network 192.168.20.0
R2(config-router)#network 192.168.30.0
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#exit

R3#conf t 全局模式
R3(config)#router rip 配置R3的RIP路由协议
R3(config-router)#network 192.168.30.0
R3(config-router)#network 192.168.40.0
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#exit

7,查看三个路由器的路由表有没有相互学习到对方的路由表10.20.30.40网段
do show ip route 查看路由表信息



8,测试现在两台pc机是否能够相通


实验成功
谢谢阅读!!!