|
|
Fastethernet0/0 |
Fastethernet1/0 |
Fastethernet2/0 |
R1 |
12.12.12.1/24 |
N/A |
N/A |
R2 |
12.12.12.2/24 |
23.23.23.2/24 |
N/A |
R3 |
23.23.23.3/24 |
N/A |
N/A |
|
Loopback 0 |
Loopback 1 |
Loopback 2 |
R1 |
10.1.0.1/24 |
10.1.1.1/24 |
10.1.2.1/24 |
l R1、R2、R3三台路由器运行RIP协议 。
l 并在R1上开启环回接口Loopback 0、Loopback 1、 Loopback 2 。
l 将环回接口的地址网段在R1上汇总后传递给R2、R3。
l 查看RIP汇总前后的R2路由表效果变化。
1) 先配R1、R2、R3运行RIP协议,并配置环回接口地址,实现设备互通。
(config)#router rip //开启RIP进程//
(config-router)#version 2 //RIP版本号为2 //
(config-router)#no auto-summary //关闭自动汇总//
(config-router)#network x.x.x.x //宣告网段//
(config)#interface Loopback x
(config-if)#ip address x.x.x.x x.x.x.x //配置环回接口地址//
2) 在R1的F0/0(与R2相连的接口)上做RIP汇总配置
(config)#interface fastethernet 0/0
(config-if)# ip summary-address rip x.x.x.x x.x.x.x //汇总RIP的路由条目 //
1. 在没有汇总前,R2的路由表:
上图表明有三条明细路由能被R2接收到。
2. 在有汇总后,R2的路由表:
上图表明明细路由已经没有了,但有条汇总路由被R2接收。
3. 汇总后,验证R3能否与R1的任一个环回接口地址通信。
上图表明汇总后,R3仍能与明细路由条目通信。
R1:
enable
conf t
hostname R1
interface Loopback0
ip address 10.1.0.1 255.255.255.0
!
interface Loopback1
ip address 10.1.1.1 255.255.255.0
!
interface Loopback2
ip address 10.1.2.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
ip summary-address rip 10.1.0.0 255.255.252.0
no shutdown
exit
!
router rip
version 2
network 10.0.0.0
network 12.0.0.0
no auto-summary
!
end
R2:
enable
conf t
hostname R2
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
no shutdown
exit
!
interface FastEthernet1/0
ip address 23.23.23.2 255.255.255.0
no shutdown
exit
!
router rip
version 2
network 12.0.0.0
network 23.0.0.0
no auto-summary
!
end
R3:
enable
conf t
hostname R3
interface FastEthernet0/0
ip address 192.168.23.3 255.255.255.0
no shutdown
exit
!
router rip
version 2
network 192.168.23.0
no auto-summary
!
end
1) RIP的汇总只能在接口下做汇总,不能在RIP进程下做汇总。
2) 注意汇总的路由条目网段的划分以及子网掩码的规划
如:10.1.0.1/24
10.1.1.1/24
10.1.2.1/24
以上三条路由条目汇总成一条路由,可通过10.1.0.0/22实现,此时这条汇总路由条目只能包含10.1.0.0/24 、10.1.1.0/24 、10.1.2.0/24 、10.1.3.0/24这四条路由条目。
具体:interface f0/0
ip summary-address rip 10.1.0.0 255.255.252.0
您的朋友 周俊杰(Jay)
新浪微博:http://weibo.com/zhoujj0130
新浪博客:http://blog.sina.com.cn/zhoujj0130
|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )
GMT+8, 2024-5-2 09:06 , Processed in 0.058680 second(s), 18 queries , Gzip On.