实验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,如需转载请自行联系原作者

NA-NP-IE系列实验13:使用子网地址相关推荐

  1. STM32 基础系列教程 13 – ADC DMA

    前言 学习stm32 adc模数转换接口使用,学会用STM32对模拟信号时行采样,通过DMA方式得到ADC结果. 示例详解 基于硬件平台: STM32F10C8T6最小系统板, MCU 的型号是 ST ...

  2. RCNN系列实验的PASCAL VOC数据集格式设置

    我们在做RCNN系列的实验时,往往需要把数据集的格式设置为和PASCAL VOC数据集一样的格式,其实当然也可以修改读取数据的代码,只是这样更为麻烦,自己的数据格式变了又得修改.  首先以VOC200 ...

  3. Mininet系列实验(七):Mininet脚本实现控制交换机行为

    Mininet系列实验(七):Mininet脚本实现控制交换机行为 1 实验目的 熟悉Mininet自定义拓扑脚本的编写: 掌握使用"ovs-vsctl"命令直接控制Open vS ...

  4. Mininet系列实验(六):Mininet动态改变转发规则实验

    Mininet系列实验(六):Mininet动态改变转发规则实验 一. 实验目的 熟悉Mininet自定义拓扑脚本的编写: 熟悉编写POX脚本动态改变转发规则 二.实验原理 在SDN环境中,控制器可以 ...

  5. Mininet系列实验(三):Mininet命令延伸实验扩展

    Mininet系列实验(三):Mininet命令延伸实验扩展 1 实验目的 熟悉Mininet自定义拓扑三种实现方式:命令行创建.Python脚本编写.交互式界面创建. 2 实验原理 Mininet ...

  6. Mininet系列实验(五):Mininet设置带宽之简单性能测试

    Mininet系列实验(五):Mininet设置带宽之简单性能测试 1.实验目的 该实验通过Mininet学习python自定义拓扑实现,可在python脚本文件中设计任意想要的拓扑,简单方便,并通过 ...

  7. arduino红外热释电传感器_【Arduino】108种传感器系列实验(17)-热释电传感器模块-Arduino中文社区 - Powered by Discuz!...

    本帖最后由 eagler8 于 2019-8-24 22:13 编辑 37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止37种的.鉴于本人手头积累了一些传感器 ...

  8. 汇编语言随笔(11)- int 指令(返回到应用程序的中断例程),实验13(编写、应用中断例程)

    int 指令 int 指令的格式为:int n,n为中断类型码.这里由 n 显式的给出了调用哪一个中断处理程序.       CPU 的中断过程仍然是: (1)取中断类型码n (2)标志寄存器入栈,I ...

  9. WebGoat系列实验Cross-Site Scripting (XSS)

    WebGoat系列实验Cross-Site Scripting (XSS) PhishingTitle 本次实验是在一个已知存在XSS漏洞的页面进行钓鱼攻击.通过使用XSS与HTML注入,在页面中注入 ...

最新文章

  1. Spring注解创建Bean的几种方式
  2. 计算机仿真和vr的区别,AR对比VR有何不同?你能分清楚他们的区别么
  3. Go 语言编程 — Overview
  4. python编写一个压测重启的测试程序
  5. Elasticsearch 不同的搜索类型之间的区别
  6. C语言实现的ABCI
  7. [2021-06-19] 提高组新手副本Ⅱ(联网,欧几里得,分解树,开关灯)
  8. 《Java8实战》笔记(07):并行数据处理与性能
  9. 数据人看Feed流-架构实践
  10. 实战:kafka实现日志收集系统
  11. 关于微信拼车小程序开发的需求分析(需求获取)
  12. CZTZ-JavaEE Web开发基础平台系列培训(一)-数据库设计规范
  13. Android仿微信地图定位和位置选择(上)
  14. JVM(三)类加载与字节码技术
  15. 计算机服务器是干什么用的,服务器是干什么的 定义和作用介绍
  16. 遗传算法java(中国外运杯)
  17. linux离线安装netstat,在Ubuntu中安装netstat等网络工具
  18. 什么是有氧运动?什么是无氧运动?哪个减肥效果更好?
  19. JDE(Towards Real-Time Multi-Object Tracking)代码测试——小白必看
  20. 微分方程建模(人口预测,捕食者猎物)

热门文章

  1. pytorch 查看当前学习率_pytorch调整模型训练的学习率
  2. no.7_qzhai 开心版_传世霸业超变版下载-传世霸业超变版手机版下载v1.0
  3. Java单向链表操作详解
  4. MySQL数据库:完整性约束
  5. Java高并发编程:线程池
  6. linux检测网卡步骤,linux网卡检测命令
  7. mybatis 自定义函数_JDK动态代理一定要有代理对象吗?请你结合Mybatis回答
  8. python2必须安装步骤_Python入门-第三方库的安装及环境配置(2)
  9. VisualSVN Server的配置和使用方法 图文
  10. [NOI2007] 货币兑换 解题报告