思科企业基础架构CCIE全系实验:RIP协议

第5章
从本章开始,我们将进入到正式的路由协议,在TCP/IP协议栈中,最重要和应用最广泛的几个路由协议有:RIP协议、EIGRP协议(思科私有)、OSPF协议和BGP协议,我们将在今后几部分中一一为大家讲解。当然这些都是CCIE认证考试的重要组成部分,而且路由是一切应用的基础

乾颐堂安德
RIP协议

本章要点
? RIP理论基础和场景需求
? 实验拓扑和需求描述
? RIP实验步骤
5.1 RIP理论基础和场景需求
RIP即路由信息协议,是最早的用于生产环境的TCP/IP协议栈的动态路由协议。相对静态来讲,动态路由更加灵活,但是相对的要维护动态路由协议的多种报文
RIP协议的处理是通过UDP520的端口来操作的。当然RIP的最终极目的还是更新路由,使得路由器的控制层面得以构建
RIP定义了两种信息类型:请求信息和响应信息。作为参考,我们给出一个RIPv2的典型报文,可以清晰的看到其工作在UDP层面,这是一个response报文(RIP另外一个报文是request,用于请求路由表)

图5-1 Wireshark抓取的RIPv2的Response报文
RIP使用一个单一的路由度量(跳数)测量到达目的网络的距离,最大度量为15跳,如果一条路由的条数为16跳则不可达
RIP有一系列的计时器协同工作:
更新计时器update timer(30秒)
无效计时器invalid timer(180秒)
flush冲刷计时器(无效计时器长60秒,RFC1058规定为120S)
抑制计时器(180秒,思科私有参数)
如果路由更新通告的跳数大于路由表已记录的跳数,并且更新来自于已记录条目的下一跳路由器,那么该路由将在一个指定的抑制时间段内被标记为不可到达。如果在抑制时间超时后,同一台邻居路由器仍然通告这个有较大跳数的路由,路由器则接受该路由新的度量值
RIP还有一系列的防环机制:
① 水平分割-把信息从收到它的方向发回去没有任何意义。
② 毒性逆转-从一个接口接收到的路由,从同一个接口update出去的时候,metric值设为最大,16跳。
③ 路由毒化-路由器向外宣告无效路由时,将其跳数置为最大值。
④ 触发更新。
RIP的分类:RIP分为V1和V2.其中RIPv1为有类路由(它在更新路由信息时不携带子网掩码)
RIP作为TCP/IP协议栈的第一代动态路由协议已经很少使用,但是仍然是CCIE认证中不可或缺的部分,虽然分值仅仅在2分左右(同时不会涉及RIPv1)。因为它确实还可以用于性能不太理想的中小型分制企业的路由器,同时它还是一个公有标准的路由协议
5.2 实验拓扑和需求描述

图5-2 在Branch和HQ完成RIP协议
本实验中仅仅用到Branch和HQ设备,不用关心SW1和SW2。通过配置Branch和HQ设备完成对RIP的理解。如图5-2为本实验的拓扑图。
5.3 RIP实验步骤
5.3.1 配置RIPv1,并观察有类路由
RIP分为v1和v2,RIPv1有很多弱点,比如它是一个有类路由,更新路由时仅仅有前缀,而没有掩码,不携带下一跳,不支持认证等特点。我们在此依旧使用和配置RIPv1的目的是为了理解动态路由协议,同时是为了保持知识的完整性和流畅性
Branch的IP地址验证:
Branch#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES NVRAM up up
Ethernet0/0.10 10.1.10.254 YES manual up up
Ethernet0/0.20 10.1.20.254 YES manual up up
Ethernet0/1 192.168.1.1 YES manual up up
说明:e0/0的两个子接口为下联PC的网关,相关配置如下:
interface Ethernet0/0.10
encapsulation dot1Q 10
ip address 10.1.10.254 255.255.255.0
interface Ethernet0/0.20
encapsulation dot1Q 20
ip address 10.1.20.254 255.255.255.0
HQ设备地址配置:
HQ#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.16.1.254 YES manual up up
Ethernet0/1 192.168.1.2 YES manual up up
Ethernet0/2 unassigned YES NVRAM up up
Ethernet0/3 unassigned YES NVRAM up up
Branch和HQ配置RIPv1
Branch:
router rip
network 10.0.0.0—RIP仅仅可以通告主类路由,不带任何掩码
network 192.168.1.0—通告和HQ的直连网段,用于同步RIP的数据库
no auto-summary---需要说明的是,RIPv1为有类路由,是否关掉自动汇总没有任何意义,因为它在
更新时不携带任何掩码信息,都为主类的路由,我们将在后边专门讨论RIP的
自动汇总(事实上,任何一种距离适量协议我们都做讨论)
HQ:
router rip
network 172.16.0.0
network 192.168.1.0—通告和Branch的直连网段,用于同步RIP的数据库。注意HQ没有关掉自动汇总
验证:
Branch#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set
R 172.16.0.0/16 [120/1] via 192.168.1.2, 00:00:22, Ethernet0/1—虽然HQ的接口为24位掩码,但
是由于RIPv1是有类的,则总是
传递不带子网的路由
HQ#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

R 10.0.0.0/8 [120/1] via 192.168.1.1, 00:00:05, Ethernet0/1
下图5-3为RIPv1的报文仅供参考,其中可以看到RIPv1的request报文目标地址为广播地址255.255.255.255

图5-3 RIPv1的报文
5.3.2 认识和配置RIPv2
RIPv2协议不是一个新的协议,它只是在RIPv1协议的基础上增加了一些扩展特性:
每个路由条目都携带自己的子网掩码,支持VLSM、支持无类路由CIDR查找
路由选择更新具有认证功能
每个路由条目都携带下一跳地址
通过组播路由更新(224.0.0.9)
默认情况下路由在跨越主类网络边界时,会自动汇总,但是也可以关闭自动汇总,进行手动汇总
特别需要说明的是,有无数的学员会在实施RIP时,在某一端忘记配置”version 2“命令,这将引起巨大的麻烦
Branch:
router rip
version 2—配置为RIPv2,注意两端都需要配置RIPv2,否则会出现路由缺失的问题
network 10.0.0.0
network 192.168.1.0
no auto-summary—关闭自动汇总,然后观察路由,注意,RIPv2为无类路由,即路由更新携带掩码
信息,我们会看到子网。注意关掉自动汇总才是我们常用的策略
HQ:
router rip
version 2
network 172.16.0.0
network 192.168.1.0
no auto-summary
验证:
如果我们没有通过clear ip route 的命令来清除路由的话,我们可能会看到下面的情况:
Branch#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area,
- candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R 172.16.0.0/16 is possibly down,
routing via 192.168.1.2, Ethe---该路由可能已经不可达。这是因为该路由已经无效,但是
还没被冲刷掉,所以RIP并不是一个收敛速度很快的协议
R 172.16.1.0/24 [120/1] via 192.168.1.2, 00:00:24, Ethernet0/1
HQ#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/24 is subnetted, 2 subnets

R 10.1.10.0 [120/1] via 192.168.1.1, 00:00:24, Ethernet0/1
R 10.1.20.0 [120/1] via 192.168.1.1, 00:00:24, Ethernet0/1
此时我们得到的路由才是一个正确的非常具体的明细路由,这是也最通常的情况
5.3.3 观察RIP的自动汇总
再次重申,关掉自动汇总才是我们最常用的手段,一定意义上自动汇总(目的是减少路由表)会造成某些拓扑中的路由器不知道如何路由数据包
① RIP会把本身产生的路由(通告)、重分布的路由汇总到主类的边界,比如10.1.1.0/24的路由会自动汇总到10.0.0.0/8。
Branch(config)#router rip
Branch(config-router)#auto-summary---该命令是默认的,在之前我们关掉,此时再次配置
!
HQ(config)#router rip
HQ(config-router)#auto-summary
此时,没有刷新路由表时的情况:
HQ#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

R 10.0.0.0/8 [120/1] via 192.168.1.1, 00:00:16, Ethernet0/1—自动汇总得到的路由
R 10.1.10.0/24 [120/1] via 192.168.1.1, 00:00:44, Ethernet0/1---之前关闭自动汇总得到的路由
R 10.1.20.0/24 [120/1] via 192.168.1.1, 00:00:44, Ethernet0/1
如果你有足够的耐心,你可以看到下面的情况:
Branch#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks

R 172.16.0.0/16 [120/1] via 192.168.1.2, 00:00:21, Ethernet0/1---从对端更新得到的汇总到主
类的路由(B类默认的16位
的掩码)
R 172.16.1.0/24 [120/1] via 192.168.1.2, 00:03:03, Ethernet0/1---请读者注意一下次此处的时间,3分03秒即180秒(会多出一点点)该路由还出于老化计时器的时间之内
Branch#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks

R 172.16.0.0/16 [120/1] via 192.168.1.2, 00:00:25, Ethernet0/1
R 172.16.1.0/24 is possibly down,
routing via 192.168.1.2, Ethe---此时在冲刷计时器的时间内
为了更好的观察RIPv2,HQ观察debug ip rip得到的报文
Oct 20 06:18:07.594: RIP: sending v2 update to 224.0.0.9 via Ethernet0/1 (192.168.1.2)---从该接口发送
组播更新
Oct 20 06:18:07.594: RIP: build update entries
Oct 20 06:18:07.594: 172.16.0.0/16 via 0.0.0.0, metric 1, tag 0---更新汇总之后的16的路由,注意
此处的0.0.0.0是固定的,tag为0
(外部路由可以设置该值)
HQ#
Oct 20 06:18:09.113: RIP: received v2 update from 192.168.1.1 on Ethernet0/1
Oct 20 06:18:09.113: 10.0.0.0/8 via 0.0.0.0 in 1 hops---一个汇总到主类边界的路由
HQ#
Oct 20 06:18:19.163: RIP: sending v2 update to 224.0.0.9 via Ethernet0/0 (172.16.1.254)
Oct 20 06:18:19.164: RIP: build update entries
Oct 20 06:18:19.165: 10.0.0.0/8 via 0.0.0.0, metric 2, tag 0
Oct 20 06:18:19.165: 192.168.1.0/24 via 0.0.0.0, metric 1, tag 0
② 接下来HQ关掉自动汇总,Branch保持自动汇总。
HQ(config-router)#no auto-summary
两台设备clear ip route

HQ#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

R 10.0.0.0/8 [120/1] via 192.168.1.1, 00:00:20, Ethernet0/1---Branch保持了自动汇总,那么该设
备更新报文时就已经进行过汇总,
所以得到了/8的路由
Branch#sh ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  172.16.0.0/24 is subnetted, 1 subnets

R 172.16.1.0 [120/1] via 192.168.1.2, 00:00:12, Ethernet0/1---HQ关掉了自动汇总,那么HQ
更新报文时就是/24的路由,所
以该设备得到了明细路由
③ 不自动汇总的情况。
对于连续子网的环境,在通告路由给邻居的时候,会带上子网掩码,通告明细路由
为了观察该现象,我们需要改造一下拓扑,把Branch和HQ的直连改为/30的子网,把HQ的e0/0地址改为192.168.1.5/30.同时两台设备都开启自动汇总
Branch:
interface Ethernet0/1
ip address 192.168.1.1 255.255.255.252
router rip
version 2
network 10.0.0.0
network 192.168.1.0
HQ:
interface Ethernet0/0
ip address 192.168.1.5 255.255.255.252
interface Ethernet0/1
ip address 192.168.1.2 255.255.255.252
router rip
version 2
network 172.16.0.0
network 192.168.1.0
验证:
Branch#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks

R 192.168.1.4/30 [120/1] via 192.168.1.2, 00:00:15, Ethernet0/1
我们发现此时Branch得到的路由是一个没有汇总的路由,因为此时HQ的192.168.1.0/30和192.168.1.4/30是连续的子网(在同一个主类网络前缀)
5.3.4 RIP的单播更新和PASSIVE
passive-interface是指RIP不发组播更新,可以接收更新,此时可以用neighbor命令指定邻居可以单播更新。总体上而言这是一种节省路由器资源的技术,因为需要把连接主机的接口所在网络更新给对端,而同时该接口是不需要对主机发送路由更新的。
如果没有passive-interface,而用neighbor命令指定邻居,那么RIP进程单播、组播更新一起发送。
在配置下面步骤之前请自行关掉两个设备的自动汇总(省略)
Branch:
router rip
version 2
passive-interface default—passive掉所有运行RIP的接口,当然此时也可以单独passive掉e0/1接口
network 10.0.0.0
network 192.168.1.0
no auto-summary
HQ:
router rip
version 2
passive-interface default
network 172.16.0.0
network 192.168.1.0
no auto-summary
清除完毕路由之后会发现没有任何路由,因为本身这就是一种抑制路由更新的技术
下面配置单播更新路由
Branch(config-router)#neighbor 192.168.1.2

HQ(config-router)#neighbor 192.168.1.1
如果开启debug ip rip 的话会看到如下信息:
Oct 20 07:55:44.668: RIP: sending v2 update to 192.168.1.2 via Ethernet0/1 (192.168.1.1)—单播更新
Oct 20 07:55:44.668: RIP: build update entries
Oct 20 07:55:44.668: 10.1.10.0/24 via 0.0.0.0, metric 1, tag 0
Oct 20 07:55:44.668: 10.1.20.0/24 via 0.0.0.0, metric 1, tag 0
5.3.5 RIPv2的认证
RIPv1不支持认证
RIPv2支持明文和MD5认证,如果认证不通过,则不会收到来自邻居的路由信息。需要说明的是路由协议的认证并不像ppp一样是认证链路的
配置MD5认证:
Branch:
key chain QYT---“钥匙链”名为QYT,具有本地意义,即两端可以不同
key 1---任何的MD5的key ID必须要相同
key-string cisco---key的密码两端要相同
interface Ethernet0/1
ip address 192.168.1.1 255.255.255.252
ip rip authentication mode md5---开启RIP的认证模式为MD5
ip rip authentication key-chain QYT---调用key chain

HQ:
key chain QYT
key 1
key-string cisco
interface Ethernet0/1
ip address 192.168.1.2 255.255.255.252
ip rip authentication mode md5
ip rip authentication key-chain QYT
验证:
HQ#show key chain
Key-chain QYT:
key 1 -- text "cisco"
accept lifetime (always valid) - (always valid) [valid now]
send lifetime (always valid) - (always valid) [valid now]
验证路由情况
HQ#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/24 is subnetted, 2 subnets

R 10.1.10.0 [120/1] via 192.168.1.1, 00:00:20, Ethernet0/1
R 10.1.20.0 [120/1] via 192.168.1.1, 00:00:20, Ethernet0/1
配置明文认证更加简单,默认情况下RIPv2就是明文认证,只要不开启MD5认证即为明文认证
Branch(config)#interface e0/1
Branch(config-if)#no ip rip authentication mode md5
此时就开启了text认证,如果另外一端不去掉则无法同步路由信息
5.3.6 RIPv1和RIPv2的兼容性问题
该问题存在于一端运行RIPv1,另外一端运行RIPv2的场景。我们用如下实验验证兼容性以及解决方案
我们恢复配置如下:
Branch:
router rip
network 10.0.0.0
network 192.168.1.0
no auto-summary---注意,此时默认运行了RIPv1,关闭自动汇总其实是无效的
HQ:
router rip
version 2
network 192.168.1.0
no auto-summary
验证路由情况:
Branch#show ip route rip ---Branch收到了HQ的路由
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  192.168.1.0/24 is variably subnetted, 3 subnets, 3 masks

R 192.168.1.4/30 [120/1] via 192.168.1.2, 00:00:17, Ethernet0/1
Branch#show ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 14 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0.10 1 1 2
Ethernet0/0.20 1 1 2
Ethernet0/1 1 1 2 ---默认情况下RIPv1一侧发送V1的报文,接收V1和V2
的报文,所有Branch接收了HQ的RIPv2报文,生成了
路由表
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
192.168.1.0
Routing Information Sources:
Gateway Distance Last Update
192.168.1.2 120 00:00:20
Distance: (default is 120)
此时HQ就没有那么幸运,它不会收到路由:
HQ#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set
通过如下命令验证RIP的信息
HQ#show ip protocols
IP Routing is NSF aware

Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)

Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 9 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0 2 2
Ethernet0/1 2 2 ---HQ因为运行了RIPv2,默认情况下发送并接收的报文
仅仅是RIPv2,所以不能收取RIPv1的报文,RIP的数据
库都不会显示
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
192.168.1.0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
HQ#show ip rip database ---数据库没有对端的路由表项
192.168.1.0/24 auto-summary
192.168.1.0/30 directly connected, Ethernet0/1
192.168.1.4/30 directly connected, Ethernet0/0
我们可以使用接口下的兼容命令完成解决方案:
HQ:
interface Ethernet0/1
ip address 192.168.1.2 255.255.255.252
ip rip receive version 1 2---HQ接口下可以接收两个版本的RIP消息(当然也可以设置发送的报文类型)
验证:
HQ#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

R 10.0.0.0/8 [120/1] via 192.168.1.1, 00:00:25, Ethernet0/1
HQ收到了对端的路由。当然最好的方案是两侧都配置RIPv2

原文地址:https://blog.51cto.com/enderjoe/2437651

时间: 2024-08-29 09:56:08

思科企业基础架构CCIE全系实验:RIP协议的相关文章

企业基础架构CCIE课程体系实验体系逐步完善中

关于近期招生遇到的问题,以及我们内部关于企业IE与RS学员的转化几个问题(Enterprise infrastructure CCIE军哥(安德)课程即将上线(预期2019年7月份)1.近期一两个月报名的学员最关心自己是否可以学习新的企业ie知识,他们理论课才上到na,后续时间安排紧张,国内考场位置也很紧张.他们自己觉得自己备考rs五套版本来不及,想直接考企业ie这种情况.回答:在qyt服务期限内可以学企业基础架构CCIE的知识并且可以备考企业基础架构ie的lab,请大家放心学习. 2.有部分学

企业基础架构ccie:组播中的igmp全系实验

20.1 IGMP互联网组管理协议 IGMP(internet group manage protocol)协议是主机跟路由器之间的控制协议,主机通过IGMP协议向组播路由器报告自己想加入的组,路由器通过IGMP协议查询网段上是否还有特定组的成员,协议号为2.当前IGMP对IPv4有3个版本:RFC1112-IGMPv1(参见RFC1112中IGMP的结构)RFC2236-IGMPv2RFC3376-IGMPv3主机跟路由器之间的组控制协议称之为Multicast Listener Discov

乾颐堂安德企业基础架构CCIE即EI CCIE技术LAB文档-LISP协议

LISP协议LISP协议,即Locator/ID Separation Protocol,位置身份分离协议.它将传统的地址分拆为表明位置的RLOCs(Routing Locators,路由标识符)和表明身份的EIDs(Endpoint Identifiers,节点标识符),也就是位置和身份分离机制.传统园区网的拓扑基于地址和路由,地址就是拓扑或者位置,它基于vlan和子网,或者说一个地址既代表了一个设备的位置,又代表了该设备的身份.如图12-1所示,位于园区网站点1的10.1.0.1基于vlan

企业基础架构EI CCIE课程LAB文档:GuestShell实验

本文对应思科全新企业架构EI CCIE考试大纲第5部分内容.1.思科IOS XE系统它是思科企业级别设备上最新的操作系统(其实也有几年了),是思科四大系列操作系统(IOS.IOS XE.IOS XR.NX-OS)之一支持的核心技术:Application Centric Infrastructure (ACI). Fibre Channel over Ethernet (FCoE).Ethernet 虚拟私有网络 (E虚拟私有网络).Segment Routing.Locator/ID Sepa

欢迎你,企业架构CCIE,RS CCIEv5.0的升级版新时代迎合自动化运维的网工顶级认证

欢迎你,企业架构CCIE,作者乾颐堂安德 或许,这就是能力!想起一句电影台词,"股票是什么,股票是人类对未来的预测,预测对了你就是赢家,预测错了你就是输家",没错预测就是一种能力,2019年6月10日下午乾颐堂茶话会公开课,名字为"思科一出,谁与争锋!",其中的小道消息主要概括为"思科将发布新的CCIE,时间为2020年2月",果然在今天思科就发布了Glance,这个发布时间这么紧凑倒是我没想到的.好了,让我们来看看企业架构CCIE的不同吧,这是

云与移动下物流与供应链轻企业IT基础架构

伴随云计算的高速发展,将企业的应用部署在云端数据中心的方式已经成为越来越多企业的选择.以摩托罗拉系统为例,除了电子邮件系统采用微软云端的outlook 365,销售管理平台采用salesforce.com之外,公司内部的知识库系统(insite.motorolasolutions.com ).财务平台.人力资源管理平台全部采用WEB应用模式并部署在云数据中心上. 云计算及移动互联网时代的企业应用的变迁 基于实际使用经验,摩托罗拉系统认为:通过将企业应用部署在云端的方式,企业IT 系统稳定性和网络

系统架构师-基础到企业应用架构-服务层

一.上章回顾 上篇我们主要讲解了系统架构中的四种架构模式,并且分析了四种架构模式的实现及应用场景,那么先来回顾下架构中的业务逻辑层的使用及总结.  如果大家对图中讲述的内容不明白或者说是不深入那么可以参考上篇讲 解的内容:系统架构师-基础到企业应用架构-业务逻辑层. 二.摘要 本文将已架构的方式去分析分层结构中的服务层的设计,如何设计出来满足我们说的业务需求及设计规范的服务层将是我们的目标,可能我想大家在项目架构的 过程中可能有些同仁,没有用到该层,或者说是采用的是常用的分层结构的设计,而没有把

系统架构师-基础到企业应用架构-企业应用架构

一.上篇回顾 我们先来回顾下上篇讲解的内容,我们前面的几节分别讲述了,业务逻辑层.数据访问层.服务层.表现层,我们了解了这些分层的职责和分层之间的大概的关联 关系,本篇可能主要是简单的介绍下企业应用的几类模式,结合这几个分层直接的交互来完成系统功能的构建.我们还是先对我们学习的四个分层的职责和功能做个大 概的回顾,我们先来看看下图来回顾下我们讲述的内容. 我想通过上图,大家能回忆起我们讲述的相关内容,然后整理好自己的思路,我们本文将会针对这几个分层进行相应的模式的讲解,并且会结合实例来说明企业应

系统架构师-基础到企业应用架构-数据访问层

一.上章回顾 上篇我们简单讲述了服务层架构模式中的几种,并且讲解了服务层的作用及相关的设计规范,其实我们应该知道,在业务逻辑层中使用领域模型中使用服务层才 能发挥出最大的优势,如果说我们在业务逻辑层还是使用非领域模型的模式话,服务层的作用仅体现在解耦作用.其实在业务逻辑层采用领域模型时,我们前面说的持 久化透明的技术,其实我们可以通过服务层来做,我们在服务层中处理领域对象信息的持久化操作.当然本篇可能不会深入讨论持久化透明的具体实现,后面会单独开 篇来讲述,我们先来回顾下上篇讲解的内容:  上图