rip中的连续子网以及不连续子网
| RIPv1 | RIPv2 |
| 距离矢量2 | 距离矢量 |
| 最大跳计数15 | 最大跳计数15 |
| 有类的 | 无类的 |
| 基于广播的 | 基于组播224.0.09 |
| 不支持VLSM | 支持VLSM |
| 无认证 | 允许MD5认证 |
| 不支持不连续子网 | 支持不连续子网 |
下面我们来认识一下什么叫做有类以及无类,有类就是A类,B类,C类,D类网络,没有划分子网。无类就是划分了子网。
我们通过一个例子来说明,比如A类的地址1.1.1.1 子网掩码 255.255.255.0 这是子网,则它的有类网络是1.0.0.0 ,掩码255.0.0.0.无类网络就是1.1.1.0,掩码255.255.255.0.
不连续的子网?
什么叫做不连续的子网呢,不连续的子网就是,中间有其它网络来分开。比如下面该图所显示一样

在rip v1 关闭自动汇总,还是不能学习到172.16.10.1 和172.16.20.1的网络。
R7
!
interface Loopback0
ip address 172.16.10.1 255.255.255.0
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
network 172.16.0.0
network 192.168.1.0
no auto-summary
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
R6
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524JN31
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface GigabitEthernet0/
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
network 1.0.0.0
network 192.168.1.0
network 192.168.2.0
no auto-summary
!
ip classless
!
ip flow-export version
!
!
!
!
!
!
!
line con
!
line aux
!
line vty
login
!
!
!
end
R8
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524CD62
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback0
ip address 172.16.30.1 255.255.255.0
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/
ip address 192.168.2.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
network 172.16.0.0
network 192.168.2.0
no auto-summary
!
ip classless
!
ip flow-export version
!
!
!
!
!
!
!
line con
!
line aux
!
line vty
login
!
使用RIPv2 之后就可以支持不连续子网,这时候就能够学习到两边172.16.0.0 的子网了。
变为RIP v2的配置
R7
interface Loopback0
ip address 172.16.10.1 255.255.255.0
!
interface GigabitEthernet0/
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
version
network 172.16.0.0
network 192.168.1.0
no auto-summary
!
ip classless
!
ip flow-export version
!
!
!
!
!
!
!
line con
!
line aux
!
line vty
login
!
!
!
end
R6
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface GigabitEthernet0/
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
version
network 1.0.0.0
network 192.168.1.0
network 192.168.2.0
no auto-summary
!
ip classless
!
ip flow-export version
!
!
!
!
!
!
!
line con
!
line aux
!
R8
interface Loopback0
ip address 172.16.30.1 255.255.255.0
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/
ip address 192.168.2.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
version
network 172.16.0.0
network 192.168.2.0
no auto-summary
!
ip classless
!
ip flow-export version
!
!
!
!
!
!
!
line con
这时候你再查看路由表就可以看到所有路由都能学习到了。
rip中的连续子网以及不连续子网的更多相关文章
- RIP协议两个版本对不连续子网的支持情况实验
一.连续子网与不连续子网 我们经常见到说RIPv1不支持不连续子网,仅支持连续子网,那么什么是连续子网,什么是不连续子网呢? l 不连续子网:指在一个网络中,某几个连续由同一主网划分的子网在中间被多 ...
- RIP协议两个版本号对不连续子网的支持情况实验
(增加时注明"会员咨询")
- K:求取数组中最大连续子序列和的四个算法
相关介绍: 求取数组中最大连续子序列和问题,是一个较为"古老"的一个问题.该问题的描述为,给定一个整型数组(当然浮点型也是可以的啦),求取其下标连续的子序列,且其和为该数组的所有 ...
- Light oj 1138 - Trailing Zeroes (III) 【二分查找 && N!中末尾连续0的个数】
1138 - Trailing Zeroes (III) problem=1138"> problem=1138&language=english&type=pdf&q ...
- 如何在DevOps中实施连续测试
在过去的十年中,对软件开发的需求已急剧发展.软件已成为公司获得竞争优势的关键优势,特别是如果您的公司属于SaaS范畴.通过在SDLC中实施瀑布等传统流程,组织现在正在向敏捷过渡,以便以更快的速度在市场 ...
- Vbox中多台虚拟机搭建简单子网
一.目标拓扑结构: 要使192.168.31.1和192.168.32.1互相ping通. 二.步骤及问题: 1.路由器配置 SEED_Router配置IP并开启路由转发协议: ifconfig et ...
- 简述ARP请求过程(同一子网和不同子网)
1. 同一子网 主机A在准备构造链路层以太网帧头时,首先根据目的IP去查找ARP表,如果找到对应项,则直接得到目的MAC地址,如果没有查到才执行上面所说的ARP广播请求.这样做是为了最大限度地减少广播 ...
- Hive中抽取连续多天登录用户
昨天群上有人发个阿里的面试题,题目描述大概如下: 数据源:用户登录表,只有俩个字段,uid和dt 试用HQL抽取出连续登录了K天的用户uid 第一个想法就是直接用一个UDF解决,按uid分组,把dt收 ...
- js返回一组日期中最近连续的天数
用js获取一组日期(并把当天算入)中连续的天数 刚开始可能想到单纯的比较日期大小判断连续, 而又有大小月,平闰年这些因素,还是时间戳来的安全; 首先得有一组日期,比如: var arr = [ '20 ...
随机推荐
- Python操作dict时避免出现KeyError的几种方法
见原文:https://www.polarxiong.com/archives/Python-%E6%93%8D%E4%BD%9Cdict%E6%97%B6%E9%81%BF%E5%85%8D%E5% ...
- iOS:转载:IOS谓词--NSPredicate
IOS谓词--NSPredicate 分类: IOS应用2013-02-19 17:24 6792人阅读 评论(1) 收藏 举报 Cocoa 提供了NSPredicate 用于指定过滤条件,谓词是指在 ...
- PHP-Java-Bridge使用笔记
最近因为需要封装一个jar包供php调用,在网上搜索了下,基本上讲都是使用php-java-bridge,说实话,网上的教程有很多是不行的,但是功夫不负有心人,找到了一篇文章,也很感谢那篇文章的作者, ...
- 如何对exec sp_who2的结果进行选择和排序?
从网上找到了下面的两个脚本, 笔者试用过, 很好. 故记在这里. 方法一, 用临时表 CREATE TABLE #sp_who2 ( SPID INT, Status VARCHAR(255), ...
- 使用webService时,gsoap数据类型注意事项
今天在使用gsoap生成webservice客户端文件时,发现我的参数类型全被改了,比如string型变成了char*,原来有STL的地方也变没了,经过研究发现,原来和我生成的头文件时使用的参数有关, ...
- github 排名前100的项目
dotnet/roslyn The .NET Compiler Platform ("Roslyn") provides open-source C# and Visual Bas ...
- 已阻止安装程序vs2015
Burn v3.7.4906.0, Windows v10.0 (Build 15063: Service Pack 0), path: H:\vs_enterprise.exe, cmdline: ...
- redis在linux下安装并測试(在spring下调用)
官网帮助文档例如以下 Installation Download, extract and compile Redis with: $ wget http://download.redis.io/re ...
- sar详解(linux/unix通用)
转载:http://www.toxingwang.com/linux-unix/2027.html sar是linux和unix通用的性能报告工具,常用命令组合如下: sar 命令行的常用格式: sa ...
- (C++)浅谈using namespace std
1.<iostream>和<iostream.h> 在你的编译器include文件夹里面可以看到,二者是两个文件,里面的代码是不一样的. 后缀为.h的头文件c++标准已经明确提 ...