yui 发表于 2017-7-9 11:21:06

RIP-LAB

  学习目的:
  学习并掌握RIP在网络环境中的配置方法及特性。
  实施拓扑:

  R1与R2互连地址段为12.1.1.0/24;
  R1-S1/0接口IP地址为12.1.1.1/24;
  R1-loopback0环回口IP地址为1.1.1.1/24;
  R2-S1/1接口IP地址为12.1.1.2/24;
  R2-loopback0环回口IP地址为2.2.2.2/24;
  基础配置:



R1
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
no shutdown


R2
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial1/1
ip address 12.1.1.2 255.255.255.0
no shutdown
  实验步骤:



R1
router rip #设置路由协议为RIP
version 2 #由于RIP V1为有类路由协议,不支持非连续子网,以广播方式发送报文,协议报文无法携带掩码信息;RIV V2为无类别路由协议,报文中携带掩码信息,支持VLSM&CIDR,以组播的方式发送报文(组播地址为224.0.0.9)。
network 1.0.0.0 #宣告网络地址段
network 12.0.0.0
no auto-summary #关闭路由协议的自动汇总功能


R2
router rip
version 2
network 2.0.0.0
network 12.0.0.0
no auto-summary
  结果验证:



R1#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
1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
   2.0.0.0/24 is subnetted, 1 subnets
R       2.2.2.0 via 12.1.1.2, 00:00:07, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/0


  R1#show ip route rip #只查看通过RIP学习到的动态路由条目。
2.0.0.0/24 is subnetted, 1 subnets
R       2.2.2.0 via 12.1.1.2, 00:00:08, Serial1/0

打"R",指通过RIP路由协议学习到的动态路由。
【120/1】其中,120为RIP路由协议的管理距离值;1为跳数。
via 12.1.1.2 为下一跳地址,Serial1/0为出接口。


R2#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
1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 via 12.1.1.1, 00:00:10, Serial1/1
2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/1


R1#ping 2.2.2.2 source 1.1.1.1 #R1通过环回口为源地址为1.1.1.1去PING测试R2的环回口,反之亦然。
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/17/20 ms
页: [1]
查看完整版本: RIP-LAB