RIP协议与如何配置RIP_2台路由器

RIP协议

1. 概述 RIP,Routing Information Protocol,路由信息协议        

RIP采用距离矢量算法来计算路由。 

  RIP有两个版本,RIPv1和RIPv2。RIPv1已经不用,如果使用都是RIPv2。“v”是version 英 [ˈvɜːʃn] 版本的缩写

RIPv2支持无类域间路由和可变长子网掩码。 无类域间路由,Classless Inter-Domain Routing, CIDR   

        可变长子网掩码,Variable Length Subnet Mask, VLSM RIP只适用于小型的同构网络,是以跳数表示距离(每经过一个路由器则跳数加1),允许的最大跳数为15,因此任何超过15个中间站点的目的地均被表示为不可达。

https://blog.csdn.net/tyy2917193296/article/details/134997066?csdn_share_tail=%7B"type"%3A"blog"%2C"rType"%3A"article"%2C"rId"%3A"134997066"%2C"source"%3A"tyy2917193296"%7D 

思考:什么是“同构网络” RIP定期更新路由表,每隔30秒广播一次路由信息。

2. 思科路由器中配置

命令说明
router rip指定使用RIP协议
version {1|2指定RIP协议版本
network network-addr 指指定与该路由器直接相连的网络
neighbor ip-addr说明邻接路由器,以使他们能够自动更新路由
passive interface 接口 阻阻止在指定的接口发送路由更新信息
show ip route查看路由表信息
show router rip查看RIP协议路由信息

RIP路由常用的命令: 华为路由器中也可以实现相同功能,但命令不同

3.配置RIP_2台路由器

1. 说明 本门课程仅仅使用思科3560交换机和思科2911路由器。 本实验使用的是cisco 2911路由器。

2. 拓扑

下图和上图一样,但使用EVE-NG模拟器进行绘制。还可以模拟思科设备的模拟器有GNS3。

R1 Enable //从用户模式进入特权模式 configure terminal //从特权模式进入配置模式 no logging on no ip domain-lookup hostname R1 //给该设备起名,名字为R1 interface GigabitEthernet 0/0 //进入千兆口,0槽0口 no shutdown //开启该端口 ip address 192.168.1.1 255.255.255.252 //给这个三层口配置IP地址,路由器的 gigabitethernet是三层口。 exit //退出0/0口 interface GigabitEthernet 0/1 //进入千兆口,0槽1口 no shutdown //开启该端口 ip address 172.16.1.1 255.255.255.0 //给这个三层口配置IP地址,路由器的gigabitethernet是三层口。 Exit //退出0/1口 interface GigabitEthernet 0/2 //进入千兆口,0槽2口 no shutdown //开启该端口 ip address 172.16.2.1 255.255.255.0 //给这个三层口配置IP地址,路由器的gigabitethernet是三层口。 Exit /退出0/2口 router rip //路由器使用RIP协议,router后面的可选项 还有bgp, eigrp, ospf version 2 //指定使用RIP的第2版本 network 172.16.1.0 //指定与R1直连的网段 network 172.16.2.0 //指定与R1直连的网段 network 192.168.1.0 //指 定与R1直连的网段 no auto-summary exit exit write copy running-config startup-config

配置脚本

R1 enable configure terminal no logging on no ip domain-lookup hostname R1 interface GigabitEthernet 0/0 no shutdown ip address 192.168.1.1 255.255.255.252 exit interface GigabitEthernet 0/1 no shutdown ip address 172.16.1.1 255.255.255.0 exit interface GigabitEthernet 0/2 no shutdown ip address 172.16.2.1 255.255.255.0 exit router rip version 2 network 172.16.1.0 network 172.16.2.0 network 192.168.1.0 no auto-summary exit exit write copy running-config startup-config

R2 enable configure terminal no logging on no ip domain-lookup hostname R2 interface GigabitEthernet 0/0 no shutdown ip address 192.168.1.2 255.255.255.252 exit interface GigabitEthernet 0/1 no shutdown ip address 10.1.1.1 255.255.255.0 exit interface GigabitEthernet 0/2 no shutdown ip address 10.2.2.1 255.255.255.0 exit router rip version 2 network 10.1.1.0 network 10.2.2.0 network 192.168.1.0 no auto-summary exit exit write copy running-config startup-config

配置验证

PC1要能ping通PC3和PC4

PC2要能ping通PC3和PC4

  • 50
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

2301_81917336

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值