实验要求:
实验分析 :
1、基于192.168.1.0/24划分两个网段分为:192.168.1.0/25(区域0) 192.168.1.128/25(区域1) 2、区域0的网段再划分4个网段
3、通过干涉选举来解决R3为DR设备,没有BDR
4、R4环回不宣告用缺省解决,设置密码来保障安全,汇总的手段减少路由条目数量
拓扑部署:
路由配置:
R1:
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.1 27
[r1-LoopBack1]quit
[r1]interface GigabitEthernet0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.33 27
[r1-GigabitEthernet0/0/0]quit
[r1]ospf 1 router-id 192.168.1.33
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network
R2:
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.65 27
[r2-LoopBack1]quit
[r2]interface GigabitEthernet0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.34 27
[r2-GigabitEthernet0/0/0]quit
[r2]ospf 1 router-id 192.168.1.34
[r2-ospf-1]area 0
[r2ospf-1-area-0.0.0.0]network 192.168.1.34 0.0.0.0
[r2-ospf-1]area 1
[r2ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.0
R3:
[r3]interface LoopBack 1
[r3-LoopBack1]ip address 192.168.1.97 27
[r3-LoopBack1]quit
[r3]interface GigabitEthernet0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.35 27
[r3]interface GigabitEthernet0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.129 25
[r3-GigabitEthernet0/0/0]quit
[r3]ospf 1 router-id 192.168.1.34
[r3-ospf-1]area 0
[r3ospf-1-area-0.0.0.0]network 192.168.1.35 0.0.0.0
[r3ospf-1-area-0.0.0.0]network 192.168.1.97 0.0.0.0
[r3-ospf-1]area 1
[r3ospf-1-area-0.0.0.0]network 192.168.1.129 0.0.0.0
R4:
[r4]interface LoopBack 1
[r4-LoopBack1]ip address 4.4.4.1 24
[r4-LoopBack1]quit
[r4]interface GigabitEthernet0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.193 27
[r4-GigabitEthernet0/0/0]quit
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1
干涉选举:
区域0只有r1到r3,将r1与r3的dr优先级改为0,r3就是drl
[r1]interface GigabitEthernet0/0/0
[r1-GigabitEthernet0/0/0]ospf dr-priority 0
[r2]interface GigabitEthernet0/0/0
[r2-GigabitEthernet0/0/0]ospf dr-priority 0
区域汇总:
[r2]ospf 1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.224
[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.64 255.255.255.224
缺省路由:
[r4]ospf 1
[r4-ospf-1]default-route-advertise
设置接口密令:
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
实验验证: