一、实验拓扑要求
二、实验思路
地址规划,配置ip—通过RIPV2实现全网可达—优化
三、实验步骤
1、地址规划,配置ip
R1:
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-LoopBack0]ip address 192.168.1.65 27
[r1-LoopBack1]ip address 192.168.1.97 27
R2:
[r2-GigabitEthernet0/0/0]ip address 192.168.1.5 30
[r2-GigabitEthernet0/0/1]ip address 192.168.1.2 30
[r2-LoopBack0]ip address 192.168.1.129 27
[r2-LoopBack1]ip address 192.168.1.161 27
R3:
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[r3-LoopBack0]ip address 3.3.3.3 24
2、通过RIPV2实现全网可达
R1:
[r1]rip
[r1-rip-1]version 2
[r1-rip-1]undo summary
[r1-rip-1]network 192.168.1.0
R2:
[r2]rip
[r2-rip-1]version 2
[r2-rip-1]undo summary
[r2-rip-1]network 192.168.1.0
R3:
[r3]rip
[r3-rip-1]version 2
[r3-rip-1]undo summary
[r3-rip-1]network 192.168.1.0
3.3.3.0/24 网段不能直接宣告,所以在R3上做一个缺省路由,R1和R2自动学习到该缺省路由,达到全网可达的目的。
[r3-rip-1]default-route originate
查看1的路由表
查看2的路由表
测试
3、优化
(1)安全认证
[r1-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
[r2-GigabitEthernet0/0/1]rip authentication-mode md5 usual cipher 123456
[r2-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
[r3-GigabitEthernet0/0/1]rip authentication-mode md5 usual cipher 123456
(2)手工汇总,减少路由条数目:
R1上进行汇总
[r1-GigabitEthernet0/0/0]rip summary-address 192.168.1.64 255.255.255.192
R1上进行汇总
[r2-GigabitEthernet0/0/0]rip summary-address 192.168.1.128 255.255.255.192
(3)避免环路产生
[r1]ip route-static 192.168.1.64 26 null 0
[r2]ip route-static 192.168.1.128 26 null 0