小岑博客

  • 首页
  • VMware
  • 实验室
  • 培训&认证
  • 关于我
  • 分类目录
    • Citrix
    • Linux
    • Windows
    • 互联网
    • 存储
    • 虚拟化
    • 超融合
  1. 首页
  2. Cisco
  3. 正文

路由IP地址汇总(原创)

2011年5月29日 59703点热度 0人点赞 0条评论

实验为路由IP地址汇总,本实验环境为小凡搭建!!
本人亲做!望大家支持!

先看一下ip地址汇总的方法吧
把这几个网络地址展开为2进制的,然后看相同的网络位,连续而且相同的网络位就是这几个网络地址的汇总地址了,例如:
172.168.4.1/24
172.168.5.1/24
172.168.6.1/24
172.168.7.1/24
这几个地址展开来是:
10101100.10101000.00000100.00000001
10101100.10101000.00000101.00000001
10101100.10101000.00000110.00000001
10101100.10101000.00000111.00000001
他们都有相同的前22位,所以汇总地址就是 172.168.4.0/22
还有,汇总只能汇总到主类的边界,也就是说A类只能汇总到/8,B类只能汇总到/16,C类只能汇总到/24。
只有CIDR才可以突破主类边界。
好了,来看实验过程!!

1. 实验图

clip_image002

2. 按图配置

3. 测试

clip_image004a.b.clip_image006c.clip_image008

4. 配置信息
R1

-----------------------------------------------------------------------------------------------------------------

Current configuration : 826 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R1

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

!

interface FastEthernet0/0

ip address 192.168.0.9 255.255.255.252

duplex auto

speed auto

!

interface FastEthernet1/0

ip address 192.168.0.1 255.255.255.252

duplex auto

speed auto

!

interface FastEthernet2/0

ip address 192.168.0.5 255.255.255.252

duplex auto

speed auto

!

ip http server

no ip http secure-server

ip route 192.168.4.0 255.255.255.0 192.168.0.2

ip route 192.168.6.0 255.255.255.0 192.168.0.6

ip route 192.168.128.0 255.255.252.0 192.168.0.10

!

control-plane

!

line con 0

line aux 0

line vty 0 4

!

!

end
-----------------------------------------------------------------------------------------------

R2
-----------------------------------------------------------------------------------------------
Current configuration : 722 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R2

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

!

interface Loopback1

ip address 192.168.4.1 255.255.255.192

!

interface Loopback2

ip address 192.168.4.65 255.255.255.192

!

interface Loopback3

ip address 192.168.4.129 255.255.255.224

!

interface FastEthernet0/0

ip address 192.168.0.2 255.255.255.252

duplex auto

speed auto

!

ip http server

no ip http secure-server

ip route 0.0.0.0 0.0.0.0 192.168.0.1

!

control-plane

!

line con 0

line aux 0

line vty 0 4

!

!

end
-----------------------------------------------------------------------------------------------
R3
-----------------------------------------------------------------------------------------------
Current configuration : 659 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R3

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

!

interface Loopback1

ip address 192.168.6.1 255.255.255.128

interface Loopback2

ip address 192.168.6.129 255.255.255.224

!

interface FastEthernet0/0

ip address 192.168.0.6 255.255.255.252

duplex auto

speed auto

!

ip http server

no ip http secure-server

ip route 0.0.0.0 0.0.0.0 192.168.0.5

!

control-plane

line con 0

line aux 0

line vty 0 4

!

!

end

----------------------------------------------------
R4
----------------------------------------------------------------------------------------------------------------
Current configuration : 658 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R4

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

!

interface Loopback1

ip address 192.168.128.1 255.255.255.0

!

interface Loopback2

ip address 192.168.130.1 255.255.255.0

!

interface FastEthernet0/0

ip address 192.168.0.10 255.255.255.252

duplex auto

speed auto

!

ip http server

no ip http secure-server

ip route 0.0.0.0 0.0.0.0 192.168.0.9

!

control-plane

!

line con 0

line aux 0

line vty 0 4

!

!

end

-------------------------------------------------------------------------------------------------------------------

5. 路由表

R1

clip_image010
R2

clip_image012
R3

clip_image014

R4

clip_image016

本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: ip汇总方法 路由器,IP地址汇总
最后更新:2011年5月29日

小岑

我是小岑,欢迎来到我的博客,青年人,爱捣鼓些东西,对世界充满着好奇,热爱旅游。 这里随便写写,记录些文字,大抵和技术相关。 VMware vExpert | VCIX | VCAP | VCP

点赞
< 上一篇
下一篇 >

文章评论

取消回复

小岑

我是小岑,欢迎来到我的博客,青年人,爱捣鼓些东西,对世界充满着好奇,热爱旅游。 这里随便写写,记录些文字,大抵和技术相关。 VMware vExpert | VCIX | VCAP | VCP


COPYRIGHT © 2022 crazycen.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

鄂ICP备16016796号-1