CCNA配置试验之二 RIPv2协议的配置

CCNA配置试验之二 RIPv2协议的配置

RIP 概述
RIP 也称距离矢量协议,用信息包所经过的网关来做距离的单位,超过15 跳便无法到达
 
RIP 是通过UDP 端口520 来进行操作的,RIP 信息包是封装在UDP segment 中的.RIP 定义了2 种信息类型
 
Request message( 请求信息) Response message( 应答信息). 请求信息是用来向邻居请求发送一个update( 更新), 应答信息运载着这个被请求的update.
 
RIP metric 是基于hop count( 跳数) ,metric 16 代表不可达
 
RIPv2 RIPv1 的区别
-         是个无类的路由协议
-         组播(224.0.0.9 )路由更新(不用广播)
-         支持 VLSM (在更新过程中发送掩码)
-         支持手动汇总
-         支持 (MD5) 或者 纯文本认证
 
RIP   
Router(config)#router rip
激活 RIP 协议
Router(config-router)# version 2
启用 RIPv2
Router(config-router)#network network-number
选择需要激活的接口所在的网段
用试验验证 RIPv2 的配置:
试验环境如下:

试验环境说明 :
R1 ip 地址为 10.1.1 .1 (S0/0)                       网络掩码为 255.255.255.0
R2 ip 地址为 10.1.1 . 2   (S0/0)   10.2.2 .2 S0/1 网络掩码为 255.255.255.0
R3 ip 地址为 10.2.2 .3    (S0/1)                   网络掩码为 255.255.255.0
R1 S0/0  R2 S0/1 DCE
试验要求:在路由器间配置 RIPv2 使路由器间相互 ping 通。
下面开始试验(红色字体为配置内容)
 
R1
Router>en
Router#conf t
Enter configuration commands, .e per line.  End with CNTL/Z.
Router(config)#host r1
r1(config)#int s0/0
r1(config-if)#ip addr 10.1.1 .1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#clock rate 64000
r1(config-if)#exit
r1(config)#router rip
r1(config-router)#ver 2
r1(config-router)#network 10.0.0 .0
 
R2
Router>en
Router#conf t
Enter configuration commands, .e per line.  End with CNTL/Z.
Router(config)#host r2
r2(config)#int s0/0
r2(config-if)#ip addr 10.1.1 .2 255.255.255.0
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#int s0/1
r2(config-if)#ip addr 192.168.1.1 255.255.255.0
r2(config-if)#clock rate 64000
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#router rip
r2(config-router)#ver 2
r2(config-router)#network 10.0.0 .0
r2(config-router)#network 192.168.1.0
 
R3
Router>en
Router#conf t
Enter configuration commands, .e per line.  End with CNTL/Z.
Router(config)#host r3
r3(config)#int s0/1
r3(config-if)#ip addr 192.168.1.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#exit
r3(config)#router rip
r3(config-router)#ver 2
r3(config-router)#network 192.168.1.0
 
在路由器 R1  R2  R3 show ip route 查看路由表信息
R1
 
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
 
     10.0.0 .0/24 is subnetted, 1 subnets
C       10.1.1 .0 is directly connected, Serial0/0
R    192.168.1.0/24 [120/1] vi a 10.1.1 .2, 00:00:54, Serial0/0
 
R2
 
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
 
     10.0.0 .0/24 is subnetted, 1 subnets
C       10.1.1 .0 is directly connected, Serial0/0
C    192.168.1.0/24 is directly connected, Serial0/1
 
R3
 
r3>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    10.0.0 .0/8 [120/1] via 192.168.1.1, 00:00:15, Serial0/1
C    192.168.1.0/24 is directly connected, Serial0/1
 
 
在路由器 R1 show ip protocols 查看路由协议    如下内容所示 路由器之间通讯协议为 rip
r1#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 10 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
    Serial0/0             2     2
  Automatic network summarization is in effect
  Maximum path: 4
  Routing for Networks:
    10.0.0 .0
  Routing Information Sources:
    Gateway         Distance      Last Update
    10.1.1 .2             120      00:00:16
  Distance: (default is 120)
 
 
 
 
R1 上对 R3  R4 进行 ping 测试,如下所示,全部 ping 通啦
r1#ping 10.1.1 .2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1 .2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/402/576 ms
r1#ping 192.168.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 140/258/500 ms
r1#ping 192.168.1.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 356/548/860 ms
 
OK 试验成功

 

 

你可能感兴趣的:(职场,路由,休闲,CCNA配置)