博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
NA-NP-IE系列实验13:使用子网地址
阅读量:5989 次
发布时间:2019-06-20

本文共 5358 字,大约阅读时间需要 17 分钟。

实验13:使用子网地址
1.
实验目的
通过本实验可以掌握:
(1)RIPv1 使用子网地址的条件
(2)RIPv1 接收子网路由的原则
2.
拓扑结构
实验拓扑如图4-4 所示。
图4-4 RIPv1 使用子网地址
3.
实验步骤
(1)步骤1:配置路由器R0
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho r0
r0(config)#no ip domain-loo
r0(config)#lin c 0
r0(config-line)#logg s 
r0(config-line)#exec-t 00
r0(config-line)#exit
r0(config)#int loo 1
%LINK-5-CHANGED: Interface Loopback1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r0(config-if)#
r0(config-if)#ip add 172.16.1.1. 255.255.255.0
                     ^
% Invalid input detected at '^' marker.
 
r0(config-if)#ip add 172.16.1.1 255.255.255.0
r0(config-if)#int s1/1/0
r0(config-if)#ip add 172.16.2.1 255.255.255.0
r0(config-if)#clo r 64000
r0(config-if)#no sh
%LINK-5-CHANGED: Interface Serial1/1/0, changed state to down
r0(config-if)#
%LINK-5-CHANGED: Interface Serial1/1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1/0, changed state to up
r0(config-if)#do ping 172.16.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/4/7 ms
r0(config-if)#exit
r0(config)#router rip 
r0(config-router)#v 1
r0(config-router)#net 172.16.0.0
r0(config-router)#
r0(config-router)#do sh ip prot
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 2 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 1, receive 1
  Interface             Send  Recv  Triggered RIP  Key-chain
  Serial1/1/0           1     1     
  Loopback1             1     1     
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
 172.16.0.0
Passive Interface(s):
Routing Information Sources:
 Gateway         Distance      Last Update
 172.16.2.2           120      00:00:02
Distance: (default is 120)
r0(config-router)#do sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     172.16.0.0/24 is subnetted, 3 subnets
C       172.16.1.0 is directly connected, Loopback1
C       172.16.2.0 is directly connected, Serial1/1/0
R       172.16.3.0 [120/1] via 172.16.2.2, 00:00:06, Serial1/1/0
从路由器R0路由表输出可以看出,它们互相学习到了24 位的路由条目,从而
可以说明,某些情况下RIPv1 更新确实可以携带子网信息。
(2)步骤2:配置路由器R1
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho r1
r1(config)#no ip domain-loo
r1(config)#lin c 0
r1(config-line)#logg s 
r1(config-line)#exec-t
% Incomplete command.
r1(config-line)#exec-t 00
r1(config-line)#exit
r1(config)#int loo 1
%LINK-5-CHANGED: Interface Loopback1, changed state to up
r1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r1(config-if)#ip add 172.16.3.1 255.255.255.0
r1(config-if)#no hs
                 ^
% Invalid input detected at '^' marker.
 
r1(config-if)#int s1/1/0
r1(config-if)#ip add 172.16.2.2 255.255.255.0
r1(config-if)#no sh
%LINK-5-CHANGED: Interface Serial1/1/0, changed state to up
r1(config-if)#
r1(config-if)#do ping 172.16.2.1
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1/0, changed state to up
r1(config-if)#do ping 172.16.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/5 ms
r1(config-if)#exit
r1(config)#router rip 
r1(config-router)#net 172.16.0.0
r1(config-router)#do sh ip route 
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
     172.16.0.0/24 is subnetted, 3 subnets
R       172.16.1.0 [120/1] via 172.16.2.1, 00:00:05, Serial1/1/0
C       172.16.2.0 is directly connected, Serial1/1/0
C       172.16.3.0 is directly connected, Loopback1
r1(config-router)#do sh ip pro
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 5 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 1, receive any version
  Interface             Send  Recv  Triggered RIP  Key-chain
  Serial1/1/0           1     2 1   
  Loopback1             1     2 1   
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
 172.16.0.0
Passive Interface(s):
Routing Information Sources:
 Gateway         Distance      Last Update
 172.16.2.1           120      00:00:18
Distance: (default is 120)
RIPv1 
路由更新可以携带子网信息必须同时满足两个条件:
(1)整个网络所有地址在同一个主类网络;

2)子网掩码长度必须相同

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

你可能感兴趣的文章
go 语言基础
查看>>
【原创】基于部署映像服务和管理(DISM)修改映象解决WIN7 USB3.0安装时报错
查看>>
linux杀掉80端口线程命令
查看>>
QT线程初次使用。遇到的问题。
查看>>
烦恼的高考志愿
查看>>
根据矩阵变化实现基于 HTML5 的 WebGL 3D 自动布局
查看>>
查询数据库连接数
查看>>
CROSS APPLY和 OUTER APPLY 区别详解
查看>>
C# 使用Shell32 进行压缩与解压缩的标准且正确做法
查看>>
PHP如何实现页面静态化
查看>>
HDU 4371 Alice and Bob
查看>>
软测第一次lab 实验报告
查看>>
Hadoop分布式文件系统:架构和设计要点 - 转
查看>>
4.EGit基本用法
查看>>
Android FrameWork——Binder机制详解(2)
查看>>
74HC165级联
查看>>
面向对象的Shell脚本
查看>>
那一抹秋色!漂亮的秋天风景壁纸【组图】
查看>>
解密gzip压缩的网页数据流(转)
查看>>
手工建库
查看>>