1. 网段划分:
192.168.1.0/25 192.168010128/25
192.168.1.0/27 192.168.1.32/27 192.168.1.64/27 192.168.1.96/27
骨干链路 R2环回链路 R3换回链路
2.配置:
R1:area 0.0.0.0
network 192.168.1.1 0.0.0.0
network 192.168.1.32 0.0.0.31
R2: area 0.0.0.0
network 192.168.1.2 0.0.0.0
network 192.168.1.64 0.0.0.31
R3:area 0.0.0.0
network 192.168.1.3 0.0.0.0
network 192.168.1.96 0.0.0.31
area 0.0.0.1
network 192.168.1.129 0.0.0.0
R4:area 0.0.0.1
network 192.168.1.130 0.0.0.0
其中R3是DR,没有BDR。将R1/R2/R4的优先级设置为0
让R1/R2/R4放弃选举[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ospf dr-priority 0
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ospf dr-priority 0
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ospf dr-priority 0
在R3上做总的网段汇总[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.0
在R4上配置缺省[r4-ospf-1]default-route-advertise always
在R3上配置空接口防止环路出现[r3]ip route-static 192.168.1.0 25 null 0
最后OSPF区域认证:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 000000
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 000000
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 000000
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 plain 123456
最后保存在每个路由,交换机中输入save,输入y保存成功。结束