实验为路由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. 实验图
2. 按图配置
3. 测试
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
R4
文章评论