思科RIP小实验演示

RIP: 
公有标准协议;
位于OSI 第 7 层, 套接字: UDP 520
分为 version 1 和 2 
仅适用于小型网络,因为 RIP 传递只能穿越最多15个有效路由器(最多16个)
实验名称:思科RIP小实验
实验拓扑

实验需求:每个路由器的路由表都会自动装入RIP
实验思路:
1. 在每个路由器设置ip
2. 在每个路由器配置RIP
实验验证命令:
show ip protocols
show ip route
show ip route rip

配置命令:
1>en
R1#conf terminal 
Enter configuration commands, one per line. End with 
CNTL/Z.
R1(config)#int f0/0
R1(config-if)#no shu
R1(config-if)#ip add 192.
Dec 14 18:46:21.315: %LINK-3-UPDOWN: Interface 
FastEthernet0/0, changed state to up
Dec 14 18:46:22.315: %LINEPROTO-5-UPDOWN: Line protocol 
on Interface FastEthernet0/0, changed state to up
R1(config-if)#ip add 192.168.12.1 255.255.255.0
R1(config-if)#exi
R1(config)#int l 0
R1(config-if)#ip add 10.10.1.1 255.255.255.0
R1(config-if)#exi
R1(config)#router rip (启用RIP协议)
R1(config-router)#version 2 (配置当前 运行的RIP为version 2 的版本)
R1(config-router)#no auto-summary (关闭自动汇总功能)
R1(config-router)#network 192.168.12.0 (添加直连路由的路由表,把自己有的都加到RIP)
R1(config-router)#network 10.10.1.0 
R1(config-router)#exi
R1(config)#

R2>en
R2#configure t
Enter configuration commands, one per line. End with 
CNTL/Z.
R2(config)#int f0/1
R2(config-if)#no shu
R2(config-if)#ip add 192
Dec 14 18:47:34.407: %LINK-3-UPDOWN: Interface 
FastEthernet0/1, changed state to up
Dec 14 18:47:35.407: %LINEPROTO-5-UPDOWN: Line protocol 
on Interface FastEthernet0/1, changed state to up
R2(config-if)#ip add 192.168.12.2 255.255.255.0
R2(config-if)#exi
R2(config)#int l 0
R2(config-if)#ip add 10.10.2.2 255.255.255.0
R2(config-if)#exi
R2(config)#int f0/0
R2(config-if)#no shu
R2(config-if)#ip add 1
Dec 14 18:48:21.487: %LINK-3-UPDOWN: Interface 
FastEthernet0/0, changed state to up
Dec 14 18:48:22.487: %LINEPROTO-5-UPDOWN: Line protocol 
on Interface FastEthernet0/0, changed state to up
R2(config-if)#ip add 192.168.23.2 255.255.255.0
R2(config-if)#exi
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary 
R2(config-router)#net
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R2(config-router)#network 10.10.2.0 
R2(config-router)#

R3>en
R3#configure t
Enter configuration commands, one per line. End with 
CNTL/Z.
R3(config)#int f0/1
R3(config-if)#no shu
R3(config-if)#ip add 192.168
Dec 14 18:48:38.847: %LINK-3-UPDOWN: Interface 
FastEthernet0/1, changed state to up
Dec 14 18:48:39.847: %LINEPROTO-5-UPDOWN: Line protocol 
on Interface FastEthernet0/1, changed state to up
R3(config-if)#ip add 192.168.23.3 255.255.255.0
R3(config-if)#exi
R3(config)#int l 0
R3(config-if)#ip add 10.10.3.3 255.255.255.0
R3(config-if)#exi
R3(config)#int f0/0
R3(config-if)#no shu
R3(config-if)#ip add 192.1
Dec 14 18:49:21.871: %LINK-3-UPDOWN: Interface 
FastEthernet0/0, changed state to up
Dec 14 18:49:22.871: %LINEPROTO-5-UPDOWN: Line protocol 
on Interface FastEthernet0/0, changed state to up
R3(config-if)#ip add 192.168.34.3 255.255.255.0
R3(config-if)#exi
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary 
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
R3(config-router)#network 10.10.3.0

R4>en
R4#configure t
Enter configuration commands, one per line. End with 
CNTL/Z.
R4(config)#int f0/1
R4(config-if)#no shu
R4(config-if)#ip add 192.168
Dec 14 18:49:54.863: %LINK-3-UPDOWN: Interface 
FastEthernet0/1, changed state to up
Dec 14 18:49:55.863: %LINEPROTO-5-UPDOWN: Line protocol 
on Interface FastEthernet0/1, changed state to up
R4(config-if)#ip add 192.168.34.4 255.255.255.0
R4(config-if)#exi
R4(config)#int l 0
R4(config-if)#ip add 10.10.4.4 255.255.255.0
R4(config-if)#exi
R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#no auto-summary 
R4(config-router)#network 192.168.34.0
R4(config-router)#network 10.10.4.0 
R4(config-router)#end
R4#s
*Dec 14 18:51:04.707: %SYS-5-CONFIG_I: Configured from 
console by console
R4#show ip route
Codes: 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

Gateway of last resort is not set

R 192.168.12.0/24 [120/2] via 192.168.34.3, 00:00:14, 
FastEthernet0/1
10.0.0.0/24 is subnetted, 4 subnets
R 10.10.1.0 [120/3] via 192.168.34.3, 00:00:14, 
FastEthernet0/1
R 10.10.2.0 [120/2] via 192.168.34.3, 00:00:14, 
FastEthernet0/1
R 10.10.3.0 [120/1] via 192.168.34.3, 00:00:14, 
FastEthernet0/1
C 10.10.4.0 is directly connected, Loopback0
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:14, 
FastEthernet0/1
C 192.168.34.0/24 is directly connected, 
FastEthernet0/1
R4#show ip route rip
R 192.168.12.0/24 [120/2] via 192.168.34.3, 00:00:05, 
FastEthernet0/1
10.0.0.0/24 is subnetted, 4 subnets
R 10.10.1.0 [120/3] via 192.168.34.3, 00:00:05, 
FastEthernet0/1
R 10.10.2.0 [120/2] via 192.168.34.3, 00:00:05, 
FastEthernet0/1
R 10.10.3.0 [120/1] via 192.168.34.3, 00:00:05, 
FastEthernet0/1
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:05, 
FastEthernet0/1 
R4#show ip protocols 
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 27 
seconds
Invalid after 180 seconds, hold down 180, flushed 
after 240
Outgoing update filter list for all interfaces is not 
set
Incoming update filter list for all interfaces is not 
set
Redistributing: rip
Default version control: send version 2, receive 
version 2
Interface Send Recv Triggered RIP 
Key-chain
FastEthernet0/1 2 2

Loopback0             2     2                         

Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
192.168.34.0
Routing Information Sources:
Gateway Distance Last Update
192.168.34.3 120 00:00:00
Distance: (default is 120)

R4#ping 192.168.12.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout 
is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip 
min/avg/max = 12/38/80 ms
R4#



本文转自 linuxpp 51CTO博客,原文链接:http://blog.51cto.com/13505118/2050777,如需转载请自行联系原作者

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值