关于上图要求。首先把192.168.1.0/24合理划分
之后配置ip地址和各自环回
R1
R2
R3
R4
启动OSPF协议,R1,R2,R3在区域0,R3到R4为区域1,R3的环回也在区域0
优先级
让R3当DR,R1R2放弃选举
[r1-GigabitEthernet0/0/0]ospf dr
[r1-GigabitEthernet0/0/0]ospf dr-priority 0
[r2-GigabitEthernet0/0/0]ospf dr
[r2-GigabitEthernet0/0/0]ospf dr-priority 0
缺省
[r3-ospf-1]default-route-advertise always
认证
[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
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
汇总
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-summary 192.168.1.128 255.255.255.128
[r3-ospf-1-area-0.0.0.1]q
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.128
[r3-ospf-1-area-0.0.0.0]q
防环
[r3]ip route-static 192.168.1.0 25 null 0
[r3]ip route-static 192.168.1.128 25 null 0
结果